make xvfb an arg

This commit is contained in:
Johannes Rieken
2017-04-13 12:44:37 +02:00
parent 7ac05a0a88
commit 20651fb6d6
2 changed files with 7 additions and 4 deletions

View File

@@ -1,3 +0,0 @@
#!/bin/bash
xvfb-run ./test.sh "$@"

View File

@@ -29,9 +29,15 @@ test -d node_modules || ./scripts/npm.sh install
# Build
test -d out || ./node_modules/.bin/gulp compile
echo "code $CODE"
# Unit Tests
export VSCODE_DEV=1
if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ "$1" == "--xvfb" ]]; then
cd $ROOT ; \
xvfb-run "$CODE" test/electron/index.js "$@"
elif [[ "$OSTYPE" == "darwin"* ]]; then
cd $ROOT ; ulimit -n 4096 ; \
"$CODE" \
test/electron/index.js "$@"