2017-06-13 22:58:17 +02:00
|
|
|
#!/bin/bash
|
2017-11-12 20:57:59 +02:00
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
BUILD_DIR="$ROOT_DIR/tests-build"
|
2017-12-14 02:23:32 +02:00
|
|
|
TEST_FILE="$1"
|
2017-06-13 22:58:17 +02:00
|
|
|
|
2017-11-12 20:57:59 +02:00
|
|
|
rsync -a --exclude "node_modules/" "$ROOT_DIR/tests/" "$BUILD_DIR/"
|
|
|
|
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
|
|
|
rsync -a "$ROOT_DIR/build/locales/" "$BUILD_DIR/locales/"
|
|
|
|
mkdir -p "$BUILD_DIR/data"
|
2017-06-13 22:58:17 +02:00
|
|
|
|
2017-12-14 02:23:32 +02:00
|
|
|
if [[ $TEST_FILE == "" ]]; then
|
2018-02-25 19:01:16 +02:00
|
|
|
(cd "$ROOT_DIR" && npm test tests-build/synchronizer.js tests-build/encryption.js tests-build/ArrayUtils.js tests-build/models_Setting.js tests-build/services_InteropService.js)
|
2017-12-14 02:23:32 +02:00
|
|
|
else
|
|
|
|
(cd "$ROOT_DIR" && npm test tests-build/$TEST_FILE.js)
|
|
|
|
fi
|