mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
test: add --crash option to cause nodes to crash dump on test failure.
This causes full logs to be dropped in "crash.log". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ca9d775f9a
commit
36fc62ab81
@ -63,6 +63,9 @@ while [ $# != 0 ]; do
|
|||||||
;;
|
;;
|
||||||
x"--normal")
|
x"--normal")
|
||||||
;;
|
;;
|
||||||
|
x"--crash")
|
||||||
|
CRASH_ON_FAIL=1
|
||||||
|
;;
|
||||||
x"--verbose")
|
x"--verbose")
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
;;
|
;;
|
||||||
@ -213,7 +216,11 @@ all_ok()
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
trap "echo Results in $DIR1 and $DIR2 >&2; cat $DIR1/errors $DIR2/errors >&2" EXIT
|
if [ -n "$CRASH_ON_FAIL" ]; then
|
||||||
|
trap "$LCLI1 dev-crash 2>/dev/null || true; $LCLI2 dev-crash 2>/dev/null || true; echo Crash results in $DIR1 and $DIR2 >&2; cat $DIR1/errors $DIR2/errors >&2" EXIT
|
||||||
|
else
|
||||||
|
trap "echo Results in $DIR1 and $DIR2 >&2; cat $DIR1/errors $DIR2/errors >&2" EXIT
|
||||||
|
fi
|
||||||
mkdir $DIR1 $DIR2
|
mkdir $DIR1 $DIR2
|
||||||
|
|
||||||
if [ -n "$MANUALCOMMIT" ]; then
|
if [ -n "$MANUALCOMMIT" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user