diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-03-23 16:15:04 +0000 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2020-03-27 13:43:20 +0000 |
commit | 698a64f94814eb5e6a4bad5afe00ab09f163bc44 (patch) | |
tree | 7cf543e4b015bf846a50ea1e056858583f9ed665 /tests/vm | |
parent | f4ce3adf6b29e8e984b1a69e4876eaf4ac4022a9 (diff) | |
download | qemu-698a64f94814eb5e6a4bad5afe00ab09f163bc44.zip qemu-698a64f94814eb5e6a4bad5afe00ab09f163bc44.tar.gz qemu-698a64f94814eb5e6a4bad5afe00ab09f163bc44.tar.bz2 |
tests/vm: write raw console log
Run "tail -f /var/tmp/*/qemu*console.raw" in another terminal
to watch the install console.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200310083218.26355-2-kraxel@redhat.com>
Message-Id: <20200323161514.23952-2-alex.bennee@linaro.org>
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/basevm.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 8400b0e..c53fd35 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -213,6 +213,9 @@ class BaseVM(object): def console_init(self, timeout = 120): vm = self._guest vm.console_socket.settimeout(timeout) + self.console_raw_path = os.path.join(vm._temp_dir, + vm._name + "-console.raw") + self.console_raw_file = open(self.console_raw_path, 'wb') def console_log(self, text): for line in re.split("[\r\n]", text): @@ -234,6 +237,9 @@ class BaseVM(object): while True: try: chars = vm.console_socket.recv(1) + if self.console_raw_file: + self.console_raw_file.write(chars) + self.console_raw_file.flush() except socket.timeout: sys.stderr.write("console: *** read timeout ***\n") sys.stderr.write("console: waiting for: '%s'\n" % expect) |