From b1fad5a3106b047efbd7038b766bc302bfcac25c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 1 Jul 2017 06:28:13 -0400 Subject: [PATCH] Automatically run JS build process before tests if not running --- test/runtests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/runtests.sh b/test/runtests.sh index 9fe07554b..5759621ea 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -159,6 +159,16 @@ fi # Clean up on exit trap "{ rm -rf \"$TEMPDIR\"; }" EXIT +# Check if build watch process is running +# If not, run now +if [[ "$TRAVIS" != true ]] && ! ps | grep scripts/build.js | grep -v grep > /dev/null; then + echo + echo "Running JS build process" + cd "$CWD/.." + npm run build + echo +fi + makePath FX_PROFILE "$PROFILE" MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$FX_EXECUTABLE" -profile "$FX_PROFILE" \ -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" -grep "$GREP" -ZoteroTest $FX_ARGS