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:
William Manley 2018-06-28 12:10:13 +01:00 committed by Atomic Bot
parent 05d8ade563
commit bab3b2bd4c

View File

@ -34,6 +34,14 @@ else
fi
. ${test_srcdir}/libtest-core.sh
save_core() {
if [ -e core ]; then
cp core "$test_srcdir/core"
fi
}
trap save_core EXIT;
test_tmpdir=$(pwd)
# Sanity check that we're in a tmpdir that has