This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch andyp-testsuite
in repository gfs2-utils.
commit 7cc736581cd86c537500c6167cbbf707273c9650
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Feb 25 16:36:07 2022 +0000
tests: Add an option to clean up the testvol file unconditionally
Failed tests skip cleanup, so if the final test doesn't remove the
testvol then it is left around in the test environment. For CI we want
to remove it so provide a --always-clean-testvol option which cleans up
unconditionally in an EXIT trap routine.
This can be used via 'make check TOPTS=--always-clean-testvol'
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
tests/atlocal.in | 9 +++++++++
tests/testsuite.at | 3 +++
2 files changed, 12 insertions(+)
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 04ab40e9..eed58b10 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -6,3 +6,12 @@ gfs_max_blocks()
{
printf $((GFS_TGT_SZ*1073741824/$1))
}
+
+gfs_tgt_cleanup()
+{
+ if $1; then
+ rm -f $GFS_TGT
+ fi
+}
+
+trap 'gfs_tgt_cleanup $at_arg_always_clean_testvol' EXIT
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 6a625e5d..4dc4fa43 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -47,6 +47,9 @@ AT_CHECK([test x"$ENABLE_UNIT_TESTS" = "xyes" ||
exit 77])])
# Test suite begins here
AT_INIT([])
AT_COLOR_TESTS
+AT_ARG_OPTION([always-clean-testvol],
+ [AS_HELP_STRING([--always-clean-testvol],
+ [Remove the test file whether tests succeed or not])])
m4_include([mkfs.at])
m4_include([fsck.at])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date