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;
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user