From: Daniel P. Berrangé Date: Wed, 15 Mar 2023 17:43:19 +0000 (+0000) Subject: iotests: strip subdir path when listing tests X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=663755b02247b848d4a342072a528ae1d402611c;p=qmiga%2Fqemu.git iotests: strip subdir path when listing tests 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 Signed-off-by: Daniel P. Berrangé Acked-by: Hanna Czenczek Tested-by: Thomas Huth Message-Id: <20230303160727.3977246-4-berrange@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20230315174331.2959-21-alex.bennee@linaro.org> --- 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: