fix(web/engine): headless tests may trigger KMW test script fail

This commit is contained in:
jahorton 2020-04-20 13:37:09 +07:00
parent d072af7af6
commit cf3a7e4efe

View file

@ -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