summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-03 13:49:38 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-07-03 13:49:38 +0300
commitd8af7319b49c63f9ff5049abe2fe73cac22e45fc (patch)
tree8a83c42db5b0a5dc37cb106aa3ccac8253ea6667 /scripts
parent108792420c1907f4ecf1d7b03f28e4a5ac33b27f (diff)
downloadqtlocation-mapboxgl-d8af7319b49c63f9ff5049abe2fe73cac22e45fc.tar.gz
Fixed test run script
- If we cannot find 'gdb' on the system (eg. OSX does not come with gdb by default), just run the command for now; - We were missing passing the whole list of parameters, so I've replaced $1 with $@ and added '--args' for gdb to forward the params to the program call;
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_tests.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh
index b8691caa44..692269e4f1 100755
--- a/scripts/run_tests.sh
+++ b/scripts/run_tests.sh
@@ -5,7 +5,7 @@ set -o pipefail
if [ `uname -s` = 'Darwin' ]; then HOST=${HOST:-osx} ; else HOST=${HOST:-linux} ; fi
-CMD=$1
+CMD=$@
shift
# allow writing core files
@@ -24,5 +24,9 @@ if [ ! -d "test/node_modules/express" ]; then
(cd test; npm install express@4.11.1)
fi
-gdb -batch -return-child-result -ex 'set print thread-events off' \
- -ex 'run' -ex 'thread apply all bt' ${CMD}
+if which -s 'gdb'; then
+ gdb -batch -return-child-result -ex 'set print thread-events off' \
+ -ex 'run' -ex 'thread apply all bt' --args ${CMD} ;
+else
+ ${CMD} ;
+fi