2017-06-13 22:58:17 +02:00
|
|
|
#!/bin/bash
|
2018-06-10 02:19:24 +02:00
|
|
|
START_DIR="$(pwd)"
|
2017-11-12 20:57:59 +02:00
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
BUILD_DIR="$ROOT_DIR/tests-build"
|
2019-11-02 12:19:24 +02:00
|
|
|
FILTER="$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/"
|
2019-09-24 00:01:05 +02:00
|
|
|
rsync -a "$ROOT_DIR/../ReactNativeClient/locales/" "$BUILD_DIR/locales/"
|
2017-11-12 20:57:59 +02:00
|
|
|
mkdir -p "$BUILD_DIR/data"
|
2017-06-13 22:58:17 +02:00
|
|
|
|
2018-06-10 02:19:24 +02:00
|
|
|
function finish {
|
|
|
|
cd "$START_DIR"
|
|
|
|
}
|
|
|
|
|
|
|
|
trap finish EXIT
|
|
|
|
|
|
|
|
cd "$ROOT_DIR"
|
2019-11-02 12:19:24 +02:00
|
|
|
|
|
|
|
if [[ $FILTER != "" ]]; then
|
|
|
|
npx jasmine --config=tests/support/jasmine.json --filter="$FILTER"
|
|
|
|
else
|
|
|
|
npx jasmine --config=tests/support/jasmine.json
|
|
|
|
fi
|