check-block: revert TAP output and reintroduce -makecheck
PATCH 1/1 check-block: revert TAP output and reintroduce -makecheck
This reverts commits d316859f4e28c74ab8b618895d2a5e0a865d3cf1 and 308c8475bc9d7e352125dea42950afbaf9daadfe.
The TAP output is inferior in that it does not include the diff for failed tests; there are also cases (for skipped tests) where the TAP output is incorrect.
Reported-by Peter Maydell <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
Tested-by Peter Maydell <[email protected]>
Message-Id: <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- tests/check-block.sh | 6 ++-- tests/qemu-iotests/check | 6 ++-- tests/qemu-iotests/meson.build | 1 - tests/qemu-iotests/testenv.py | 30 +++++++++---------- tests/qemu-iotests/testrunner.py | 49 +++++++++++++++----------------- 5 files changed, 44 insertions(+), 48 deletions(-)
tests/check-block.sh +3 -3
@@ -14,8 +14,8 @@ else fi skip() { - echo "1..0 #SKIP $*" - exit 0 + echo "$*" + exit 77 } # Disable tests with any sanitizer except for specific ones
@@ -75,7 +75,7 @@ JOBS=$(echo "$MAKEFLAGS" | sed -n 's/\(^\|.* \)-j\([0-9]\+\)\( .*\|$\)/-j \2/p') ret=0 for fmt in $format_list ; do - ${PYTHON} ./check $JOBS -tap -$fmt $group || ret=1 + ${PYTHON} ./check $JOBS -makecheck -$fmt $group || ret=1 done exit $ret
tests/qemu-iotests/check +3 -3
@@ -32,6 +32,8 @@ def make_argparser() -> argparse.ArgumentParser: p.add_argument('-n', '--dry-run', action='store_true', help='show me, do not run tests') + p.add_argument('-makecheck', action='store_true', + help='pretty print output for make check') p.add_argument('-j', dest='jobs', type=int, default=1, help='run tests in multiple parallel jobs')
@@ -51,8 +53,6 @@ def make_argparser() -> argparse.ArgumentParser: p.add_argument('--color', choices=['on', 'off', 'auto'], default='auto', help="use terminal colors. The default " "'auto' value means use colors if terminal stdout detected") - p.add_argument('-tap', action='store_true', - help='produce TAP output') g_env = p.add_argument_group('test environment options') mg = g_env.add_mutually_exclusive_group()
@@ -164,7 +164,7 @@ if __name__ == '__main__': if args.dry_run: print('\n'.join(tests)) else: - with TestRunner(env, tap=args.tap, + with TestRunner(env, makecheck=args.makecheck, color=args.color) as tr: paths = [os.path.join(env.source_iotests, t) for t in tests] ok = tr.run_tests(paths, args.jobs)
tests/qemu-iotests/meson.build +0 -1
@@ -22,7 +22,6 @@ if have_tools and targetos != 'windows' and not get_option('gprof') endif test('qemu-iotests ' + format, sh, args: [files('../check-block.sh'), format], depends: qemu_iotests_binaries, env: qemu_iotests_env, - protocol: 'tap', suite: suites, timeout: 0, is_parallel: false)
tests/qemu-iotests/testenv.py +15 -15
@@ -287,21 +287,21 @@ def __enter__(self) -> 'TestEnv': def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: self.close() - def print_env(self, prefix: str = '') -> None: + def print_env(self) -> None: template = """\ -{prefix}QEMU -- "{QEMU_PROG}" {QEMU_OPTIONS} -{prefix}QEMU_IMG -- "{QEMU_IMG_PROG}" {QEMU_IMG_OPTIONS} -{prefix}QEMU_IO -- "{QEMU_IO_PROG}" {QEMU_IO_OPTIONS} -{prefix}QEMU_NBD -- "{QEMU_NBD_PROG}" {QEMU_NBD_OPTIONS} -{prefix}IMGFMT -- {IMGFMT}{imgopts} -{prefix}IMGPROTO -- {IMGPROTO} -{prefix}PLATFORM -- {platform} -{prefix}TEST_DIR -- {TEST_DIR} -{prefix}SOCK_DIR -- {SOCK_DIR} -{prefix}GDB_OPTIONS -- {GDB_OPTIONS} -{prefix}VALGRIND_QEMU -- {VALGRIND_QEMU} -{prefix}PRINT_QEMU_OUTPUT -- {PRINT_QEMU} -{prefix}""" +QEMU -- "{QEMU_PROG}" {QEMU_OPTIONS} +QEMU_IMG -- "{QEMU_IMG_PROG}" {QEMU_IMG_OPTIONS} +QEMU_IO -- "{QEMU_IO_PROG}" {QEMU_IO_OPTIONS} +QEMU_NBD -- "{QEMU_NBD_PROG}" {QEMU_NBD_OPTIONS} +IMGFMT -- {IMGFMT}{imgopts} +IMGPROTO -- {IMGPROTO} +PLATFORM -- {platform} +TEST_DIR -- {TEST_DIR} +SOCK_DIR -- {SOCK_DIR} +GDB_OPTIONS -- {GDB_OPTIONS} +VALGRIND_QEMU -- {VALGRIND_QEMU} +PRINT_QEMU_OUTPUT -- {PRINT_QEMU} +""" args = collections.defaultdict(str, self.get_env())
@@ -310,5 +310,5 @@ def print_env(self, prefix: str = '') -> None: u = os.uname() args['platform'] = f'{u.sysname}/{u.machine} {u.nodename} {u.release}' - args['prefix'] = prefix + print(template.format_map(args))
tests/qemu-iotests/testrunner.py +23 -26
87 lines not on this page · raw message
Signature · 1 line
2.34.1