From d8af7319b49c63f9ff5049abe2fe73cac22e45fc Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Fri, 3 Jul 2015 13:49:38 +0300 Subject: [PATCH] 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; --- scripts/run_tests.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index b8691caa4..692269e4f 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