diff --git a/web/unit_tests/test.sh b/web/unit_tests/test.sh index b04686cdf0..b54c04cae2 100755 --- a/web/unit_tests/test.sh +++ b/web/unit_tests/test.sh @@ -1,6 +1,13 @@ #! /bin/bash WORKING_DIRECTORY=`pwd` + +# Include useful testing resource functions +THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")" +KEYMAN_ROOT="$(dirname "$THIS_SCRIPT")/../.." +. "$KEYMAN_ROOT/resources/build/build-utils.sh" +. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" + # A simple utility script to facilitate our different modes for unit-testing KMW. # It's rigged to be callable by NPM to facilitate testing during development when in other folders. @@ -119,8 +126,7 @@ cd $BASE_PATH/../source # First: Keyboard Processor tests. echo "${TERM_HEADING}Running Keyboard Processor test suite${NORMAL}" cd $WORKING_DIRECTORY/node_modules/keyman-keyboard-processor -./test.sh $HEADLESS_FLAGS - +./test.sh $HEADLESS_FLAGS || fail "Tests failed by dependencies; aborting integration tests." # Once done, now we run the integrated (KeymanWeb) tests. cd $WORKING_DIRECTORY