Allow passing an argument to the crash hunt script
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# A debug script that will run the test suite repeatedly, looking for
|
||||
# crashes. Takes the number of attempts as $1 (default 10).
|
||||
# crashes. Takes the number of attempts as $1 (default 10). Any further
|
||||
# arguments are forwarded to pytest, e.g. --run-long.
|
||||
|
||||
COUNT=${1:-10}
|
||||
shift || true
|
||||
|
||||
mkdir -p ./debug
|
||||
LOGDIR=./debug
|
||||
@@ -15,7 +17,7 @@ while [ $i -lt "$COUNT" ]; do
|
||||
-ex "handle SIGSEGV stop nopass" \
|
||||
-ex "handle SIGABRT stop nopass" \
|
||||
-ex run -ex "bt full" -ex quit \
|
||||
--args .venv/bin/python -m pytest tests -q \
|
||||
--args .venv/bin/python -m pytest tests -q "$@" \
|
||||
> "$LOGDIR/crash_hunt_run_$i.log" 2>&1
|
||||
if grep -qE "SIGSEGV|SIGABRT|Segmentation fault" "$LOGDIR/crash_hunt_run_$i.log"; then
|
||||
echo ">>> CRASH on attempt $i — see $LOGDIR/crash_hunt_run_$i.log <<<"
|
||||
|
||||
Reference in New Issue
Block a user