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 authored and Atomic Bot committed 2018-06-28 15:07:14 +00:00
1 parent 05d8ade563
commit bab3b2bd4c
1 file changed
+8
+8
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