[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/9] qtest.py: Support QTEST_LOG environment variabl
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 5/9] qtest.py: Support QTEST_LOG environment variable |
Date: |
Mon, 16 Jan 2017 23:02:00 -0200 |
qtest logs everything to stderr by default, but we don't want it
to be the default behavior on test cases.
Implement the same behavior of libqtest.c, and redirect the qtest
log to /dev/null by default unless the QTEST_LOG environment
variable is set.
Signed-off-by: Eduardo Habkost <address@hidden>
---
Patch originally submitted as part of series:
* [RFC v2 00/20] qmp: Report bus information on 'query-machines'
---
scripts/qtest.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/qtest.py b/scripts/qtest.py
index d5aecb5f49..5ac2c69ba8 100644
--- a/scripts/qtest.py
+++ b/scripts/qtest.py
@@ -88,8 +88,14 @@ class QEMUQtestMachine(qemu.QEMUMachine):
self._qtest_path = os.path.join(test_dir, name + "-qtest.sock")
def _base_args(self):
+ if os.getenv('QTEST_LOG'):
+ qtest_log = '/dev/fd/2'
+ else:
+ qtest_log = '/dev/null'
+
args = super(QEMUQtestMachine, self)._base_args()
args.extend(['-qtest', 'unix:path=' + self._qtest_path,
+ '-qtest-log', qtest_log,
'-machine', 'accel=qtest'])
return args
--
2.11.0.259.g40922b1
- [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-expansion test script, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 1/9] target-i386: Move "host" properties to base class, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 2/9] target-i386: Allow short strings to be used as vendor ID, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 3/9] cpu: Support comma escaping when parsing -cpu, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 4/9] qemu.py: Make logging optional, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 5/9] qtest.py: Support QTEST_LOG environment variable,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 6/9] qtest.py: make logging optional, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 7/9] qtest.py: Make 'binary' parameter optional, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 8/9] tests: Add rules to non-gtester qtest test cases, Eduardo Habkost, 2017/01/16
- [Qemu-devel] [PATCH 9/9] tests: Test case for query-cpu-model-expansion, Eduardo Habkost, 2017/01/16
- Re: [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-expansion test script, no-reply, 2017/01/16
- Re: [Qemu-devel] [PATCH 0/9] i386: query-cpu-model-expansion test script, Jason J. Herne, 2017/01/17