diff --git a/plugins/teststeps/qemu/events.go b/plugins/teststeps/qemu/events.go index 829ac505..e1a19790 100644 --- a/plugins/teststeps/qemu/events.go +++ b/plugins/teststeps/qemu/events.go @@ -55,8 +55,8 @@ func (ts TestStep) writeTestStep(builders ...*strings.Builder) { builder.WriteString("Input Parameters:\n") builder.WriteString(fmt.Sprintf(" Executable: %s\n", ts.Executable)) builder.WriteString(fmt.Sprintf(" Firmware: %s\n", ts.Firmware)) - builder.WriteString(fmt.Sprintf(" Nproc: %s\n", ts.Nproc)) - builder.WriteString(fmt.Sprintf(" Mem: %s\n", ts.Mem)) + builder.WriteString(fmt.Sprintf(" Nproc: %d\n", ts.Nproc)) + builder.WriteString(fmt.Sprintf(" Mem: %d\n", ts.Mem)) builder.WriteString(fmt.Sprintf(" Image: %s\n", ts.Image)) builder.WriteString(fmt.Sprintf(" Logfile: %s\n", ts.Logfile)) builder.WriteString(" Steps:\n") diff --git a/plugins/teststeps/qemu/main.go b/plugins/teststeps/qemu/main.go index f0863a25..a14883b3 100644 --- a/plugins/teststeps/qemu/main.go +++ b/plugins/teststeps/qemu/main.go @@ -32,8 +32,8 @@ const ( type parameters struct { Executable string `json:"executable"` Firmware string `json:"firmware"` - Nproc string `json:"nproc,omitempty"` - Mem string `json:"mem,omitempty"` + Nproc int `json:"nproc,omitempty"` + Mem int `json:"mem,omitempty"` Image string `json:"image,omitempty"` Logfile string `json:"logfile,omitempty"` Steps []struct { diff --git a/plugins/teststeps/qemu/runner.go b/plugins/teststeps/qemu/runner.go index b008df44..1e413413 100644 --- a/plugins/teststeps/qemu/runner.go +++ b/plugins/teststeps/qemu/runner.go @@ -48,7 +48,7 @@ func (r *TargetRunner) Run(ctx xcontext.Context, target *target.Target) error { func (ts *TestStep) runQemu(ctx xcontext.Context, outputBuf *strings.Builder) error { // no graphical output and no network access command := []string{ts.Executable, "-nographic", "-nic", "none", "-bios", ts.Firmware} - qemuOpts := []string{"-m", ts.Mem, "-smp", ts.Nproc} + qemuOpts := []string{"-m", fmt.Sprintf("%d", ts.Mem), "-smp", fmt.Sprintf("%d", ts.Nproc)} command = append(command, qemuOpts...) if ts.Image != "" {