Skip to content

Commit

Permalink
contest: vm: add cmd to start VM in logs
Browse files Browse the repository at this point in the history
In the logs, we can see the command used to build the VM, the selftests,
etc. but not the one to run the VM.

The command is now added to 'log_out', which will be dumped later to the
'stdout' file.

Note that we could also move the line adding '> TREE CMD:' to log_out
from tree_cmd() to tree_popen(), but that will also add the
decoded_stacktrace.sh command to log_out, which will not contain the
output of this command as it is redirected to another file. So maybe
better not to modify 'tree_popen()' I suppose.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
  • Loading branch information
matttbe authored and kuba-moo committed Jun 18, 2024
1 parent dc7450f commit e2c20b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contest/remote/lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def start(self, cwd=None):
cmd += ["--cpus", cpus]

print(f"INFO{self.print_pfx} VM starting:", " ".join(cmd))
self.log_out += "# " + " ".join(cmd) + "\n"
self.p = self.tree_popen(cmd)

for pipe in [self.p.stdout, self.p.stderr]:
Expand Down

0 comments on commit e2c20b4

Please sign in to comment.