Skip to content

Commit

Permalink
qemu: disable serial logging when debug is enabled
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Joseph Kogut <[email protected]>
  • Loading branch information
jakogut committed Oct 31, 2022
1 parent 9adbe1f commit b1a415b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/workers/qemu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,11 @@ class QemuWorker extends EventEmitter implements Leviathan.Worker {
this.qemuOptions.cpus,
'-drive',
`format=raw,file=${this.image},if=virtio`,
'-serial',
`file:${dutSerialPath}`,
];

const serialArgs = this.qemuOptions.debug ? []
: ['-serial', 'file:${dutSerialPath}'];

// Basic mapping of node process.arch to matching qemu target architecture
// This ensures we only enable KVM on compatible architectures
function kvmTargetCompatible(arch: string) {
Expand Down Expand Up @@ -366,6 +367,7 @@ class QemuWorker extends EventEmitter implements Leviathan.Worker {
.concat(archArgs[deviceArch])
.concat(networkArgs)
.concat(firmwareArgs[deviceArch])
.concat(serialArgs)
.concat(qmpArgs);

if (this.screenCapturer != null) {
Expand Down

0 comments on commit b1a415b

Please sign in to comment.