[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 09/10] qemu-iotests: add option to save temp file
From: |
Jeff Cody |
Subject: |
[Qemu-devel] [PATCH v4 09/10] qemu-iotests: add option to save temp files on error |
Date: |
Tue, 17 Oct 2017 00:32:45 -0400 |
Now that ./check takes care of cleaning up after each tests, it
can also selectively not clean up. Add option to leave all output from
tests intact if that test encountered an error.
Signed-off-by: Jeff Cody <address@hidden>
---
tests/qemu-iotests/check | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index d2fb933..7908a9d 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -125,6 +125,7 @@ sortme=false
expunge=true
have_test_arg=false
cachemode=false
+save_on_err=false
tmp="${TEST_DIR}"/$$
rm -f $tmp.list $tmp.tmp $tmp.sed
@@ -263,6 +264,8 @@ other options
-o options -o options to pass to qemu-img create/convert
-T output timestamps
-c mode cache mode
+ -s save test scratch directory on test failure
+
testlist options
-g group[,group...] include tests from these groups
@@ -435,6 +438,10 @@ testlist options
xgroup=true
xpand=false
;;
+ -s)
+ save_on_err=true
+ xpand=false
+ ;;
'[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]')
echo "No tests?"
status=1
@@ -852,7 +859,11 @@ do
_cleanup_protocols
_cleanup_qemu
)
- rm -rf "$TEST_DIR_SEQ"
+
+ if [ "$save_on_err" != "true" ] || [ "$err" != "true" ]
+ then
+ rm -rf "$TEST_DIR_SEQ"
+ fi
fi
--
2.9.5
- [Qemu-devel] [PATCH v4 00/10] qemu-iotests improvements, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 01/10] qemu-iotests: refuse to run if TEST_DIR contains spaces, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 02/10] qemu-iotests: set TEST_DIR to a unique dir for each test, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 05/10] qemu-iotests: change qemu pid and fd tracking / cleanup, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 03/10] qemu-iotests: automatically clean up bash protocol servers, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 06/10] qemu-iotests: make ./check automatically reap QEMU processes, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 07/10] qemu-iotests: run python tests in own subdirectories, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 04/10] qemu-iotests: remove file cleanup from bash tests, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 09/10] qemu-iotests: add option to save temp files on error,
Jeff Cody <=
- [Qemu-devel] [PATCH v4 10/10] qemu-iotests: add support for running multi-threaded iotests, Jeff Cody, 2017/10/17
- [Qemu-devel] [PATCH v4 08/10] qemu-iotests: modify python tests to run from subdir, Jeff Cody, 2017/10/17
- Message not available
- Re: [Qemu-devel] [PATCH v4 00/10] qemu-iotests improvements, no-reply, 2017/10/18