[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/8] iotests: strip subdir path when listing tests
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v2 3/8] iotests: strip subdir path when listing tests |
Date: |
Fri, 3 Mar 2023 16:07:22 +0000 |
When asking 'check' to list individual tests by invoking it in dry run
mode, it prints the paths to the tests relative to the base of the
I/O test directory.
When asking 'check' to run an individual test, however, it mandates that
only the unqualified test name is given, without any path prefix. This
inconsistency makes it harder to ask for a list of tests and then invoke
each one.
Thus the test listing code is change to flatten the test names, by
printing only the base name, which can be directly invoked.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/qemu-iotests/check | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index bb294ef556..f2e9d27dcf 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -184,7 +184,7 @@ if __name__ == '__main__':
sys.exit(str(e))
if args.dry_run:
- print('\n'.join(tests))
+ print('\n'.join([os.path.basename(t) for t in tests]))
else:
with TestRunner(env, tap=args.tap,
color=args.color) as tr:
--
2.39.2
- [PATCH v2 0/8] iotests: make meson aware of individual I/O tests, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 1/8] iotests: explicitly pass source/build dir to 'check' command, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 2/8] iotests: allow test discovery before building, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 3/8] iotests: strip subdir path when listing tests,
Daniel P . Berrangé <=
- [PATCH v2 4/8] iotests: print TAP protocol version when reporting tests, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 5/8] iotests: connect stdin to /dev/null when running tests, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 7/8] iotests: register each I/O test separately with meson, Daniel P . Berrangé, 2023/03/03
- [PATCH v2 6/8] iotests: always use a unique sub-directory per test, Daniel P . Berrangé, 2023/03/03