diff options
author | Thomas Huth <thuth@redhat.com> | 2022-02-09 11:15:29 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-02-16 15:01:33 +0100 |
commit | 308c8475bc9d7e352125dea42950afbaf9daadfe (patch) | |
tree | d0d121cde95768461aa842490e4a8e1c210eb55d /tests | |
parent | a5c90c61a118027b86155cffdf4fe4e2e9de1020 (diff) |
tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode
When running in TAP mode, stdout is reserved for the TAP protocol.
To see the "diff" of the failed test, we have to print it to
stderr instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220209101530.3442837-8-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qemu-iotests/testrunner.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index 0eace147b8..9a94273975 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -404,7 +404,10 @@ class TestRunner(ContextManager['TestRunner']): if res.status == 'fail': failed.append(name) if res.diff: - print('\n'.join(res.diff)) + if self.tap: + print('\n'.join(res.diff), file=sys.stderr) + else: + print('\n'.join(res.diff)) elif res.status == 'not run': notrun.append(name) elif res.status == 'pass': |