diff --git a/tests/run-test.sh b/tests/run-test.sh index 86c109b..5a86393 100755 --- a/tests/run-test.sh +++ b/tests/run-test.sh @@ -6,8 +6,14 @@ cd $SOURCE git init make bots test/common -# only install a subset to save time/space -npm install chrome-remote-interface sizzle + +# support running from clean git tree +if [ ! -d node_modules/chrome-remote-interface ]; then + # copy package.json temporarily otherwise npm might try to install the dependencies from it + mv package.json .package.json + npm install chrome-remote-interface sizzle + mv .package.json package.json +fi . /etc/os-release export TEST_OS="${ID}-${VERSION_ID/./-}"