run npm install and link once before tests

This commit is contained in:
Eric Vergnaud 2020-10-04 11:23:54 +08:00
parent 7068d1bb0d
commit 263eb29a82
3 changed files with 9 additions and 5 deletions

View File

@ -218,7 +218,7 @@ before_install:
script: script:
- | - |
cd runtime-testsuite; cd runtime-testsuite;
travis_wait 4 ../.travis/run-tests-$TARGET.sh; travis_wait 4 ../.travis/run-tests-$TARGET.sh
rc=$?; rc=$?
cat target/surefire-reports/*.dumpstream || true; cat target/surefire-reports/*.dumpstream || true
exit $rc exit $rc

View File

@ -2,4 +2,8 @@
set -euo pipefail set -euo pipefail
cd ../runtime/JavaScript
npm install
npm link
cd ../../runtime-testsuite
mvn -q -Dparallel=methods -DthreadCount=1 -Dtest=javascript.* test mvn -q -Dparallel=methods -DthreadCount=1 -Dtest=javascript.* test

View File

@ -268,8 +268,8 @@ public class BaseNodeTest implements RuntimeTestSupport {
public String execModule(String fileName) { public String execModule(String fileName) {
try { try {
String npmPath = locateNpm(); String npmPath = locateNpm();
installRuntime(npmPath); // installRuntime(npmPath);
registerRuntime(npmPath); // registerRuntime(npmPath);
String modulePath = new File(new File(tmpdir), fileName) String modulePath = new File(new File(tmpdir), fileName)
.getAbsolutePath(); .getAbsolutePath();
linkRuntime(npmPath); linkRuntime(npmPath);