1 | #!/usr/bin/env bash
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | set -e
|
20 | set -o pipefail
|
21 |
|
22 | SCRIPTDIR=$(cd $(dirname "$0") && pwd)
|
23 |
|
24 | if [ -z "$MONOREPO_MODE" ]; then
|
25 | echo "running as external custom client"
|
26 | ROOT="$SCRIPTDIR"/../..
|
27 | export TEST_SUITE_ROOT="$ROOT"/node_modules/@kui-shell
|
28 | export TEST_ROOT="$TEST_SUITE_ROOT"/test
|
29 | cd "$SCRIPTDIR"
|
30 | else
|
31 | ROOT="$SCRIPTDIR"/../../..
|
32 | echo "running in monorepo $ROOT"
|
33 | export TEST_SUITE_ROOT="$ROOT"/node_modules/@kui-shell
|
34 | export TEST_ROOT="$ROOT"/packages/test
|
35 | fi
|
36 |
|
37 | export DISPLAY=":$((PORT_OFFSET+1))"
|
38 |
|
39 | if [ -z "$WEBPACK_CLIENT_URL" ]; then
|
40 | export WEBPACK_CLIENT_URL=http://localhost:908${PORT_OFFSET-0}/index${PORT_OFFSET}.html
|
41 | echo "Using WEBPACK_CLIENT_URL=$WEBPACK_CLIENT_URL"
|
42 | fi
|
43 |
|
44 | if [ $# = 0 ]; then
|
45 | "$TEST_ROOT"/bin/runTest.sh
|
46 | else
|
47 | for i in $@; do
|
48 | export LAYER=$i
|
49 | "$TEST_ROOT"/bin/runTest.sh
|
50 | done
|
51 | fi
|