Skip to content

Commit

Permalink
fix(teststeps/qemu): rework input types
Browse files Browse the repository at this point in the history
Signed-off-by: llogen <[email protected]>
  • Loading branch information
llogen committed Apr 11, 2024
1 parent 892d8c8 commit 53b1e10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugins/teststeps/qemu/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions plugins/teststeps/qemu/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion plugins/teststeps/qemu/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down

0 comments on commit 53b1e10

Please sign in to comment.