tests: Save corefiles back to tests/ directory if one exists
Makes it easier to debug failures from the tests. Closes: #1657 Approved by: cgwalters
This commit is contained in:
parent
05d8ade563
commit
bab3b2bd4c
|
|
@ -34,6 +34,14 @@ else
|
||||||
fi
|
fi
|
||||||
. ${test_srcdir}/libtest-core.sh
|
. ${test_srcdir}/libtest-core.sh
|
||||||
|
|
||||||
|
save_core() {
|
||||||
|
if [ -e core ]; then
|
||||||
|
cp core "$test_srcdir/core"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
trap save_core EXIT;
|
||||||
|
|
||||||
test_tmpdir=$(pwd)
|
test_tmpdir=$(pwd)
|
||||||
|
|
||||||
# Sanity check that we're in a tmpdir that has
|
# Sanity check that we're in a tmpdir that has
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue