Skip to content

Commit f04c657

Browse files
committed
Test out changing test launch behaviour between platforms
1 parent edef317 commit f04c657

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

docker/test.sh

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#!/bin/bash
22
set -ex
33

4+
case $(uname | tr '[:upper:]' '[:lower:]') in
5+
linux*)
6+
export OS_NAME=linux
7+
;;
8+
darwin*)
9+
export OS_NAME=osx
10+
;;
11+
msys*)
12+
export OS_NAME=windows
13+
;;
14+
*)
15+
export OS_NAME=notset
16+
;;
17+
esac
18+
419
current_directory=$(pwd)
520

621
mkdir /tmp/code
@@ -19,8 +34,13 @@ npm run lint
1934
npm run format
2035
npm run package
2136

22-
xvfb-run -a npm run coverage 2>&1 | grep -Ev "Failed to connect to the bus|GPU stall due to ReadPixels"
23-
exit_code=${PIPESTATUS[0]}
37+
if [ "$OS_NAME" = "linux" ]; then
38+
xvfb-run -a npm run coverage 2>&1 | grep -Ev "Failed to connect to the bus|GPU stall due to ReadPixels"
39+
exit_code=${PIPESTATUS[0]}
40+
else
41+
npm run coverage 2>&1 | grep -Ev "Failed to connect to the bus|GPU stall due to ReadPixels"
42+
exit_code=${PIPESTATUS[0]}
43+
fi
2444

2545
rm -rf "${current_directory}/coverage"
2646
cp -R ./coverage "${current_directory}" || true

0 commit comments

Comments
 (0)