diff options
-rwxr-xr-x | scripts/run_tests.sh | 10 |
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 |