Skip to content

Commit 9348abd

Browse files
committed
test: add microvm helper for printing console data
Add a property in microvm class for printing console data. If console is disabled this will print an empty string. Signed-off-by: Babis Chalios <[email protected]>
1 parent bb20709 commit 9348abd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/framework/microvm.py

+7
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ def log_data(self):
370370
return ""
371371
return self.log_file.read_text()
372372

373+
@property
374+
def console_data(self):
375+
"""Return the output of microVM's console"""
376+
if self.screen_log is None:
377+
return ""
378+
return Path(self.screen_log).read_text(encoding="utf-8")
379+
373380
@property
374381
def state(self):
375382
"""Get the InstanceInfo property and return the state field."""

0 commit comments

Comments
 (0)