Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api/saucectl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,10 @@
"description": "The set of one or more versions of the device platform on which to run the test suite.",
"type": "array",
"minItems": 1
},
"armRequired": {
"description": "If set to true, the simulator will run on an ARM-based architecture. If set to false, the emulator will run on an Intel-based architecture.",
"type": "boolean"
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha/framework/espresso.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@
"description": "The set of one or more versions of the device platform on which to run the test suite.",
"type": "array",
"minItems": 1
},
"armRequired": {
"description": "If set to true, the simulator will run on an ARM-based architecture. If set to false, the emulator will run on an Intel-based architecture.",
"type": "boolean"
}
},
"required": [
Expand Down
12 changes: 12 additions & 0 deletions internal/espresso/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ suites:
- name: "Google Pixel C GoogleAPI Emulator"
platformVersions:
- "8.1"
- name: "Google Pixel 9 GoogleAPI Emulator"
platformVersions:
- "8.2"
armRequired: true
`, fs.WithMode(0655)))
defer dir.Remove()

Expand Down Expand Up @@ -233,6 +237,14 @@ suites:
PlatformVersions: []string{
"8.1",
},
ARMRequired: false,
},
{
Name: "Google Pixel 9 GoogleAPI Emulator",
PlatformVersions: []string{
"8.2",
},
ARMRequired: true,
},
}},
},
Expand Down
6 changes: 6 additions & 0 deletions internal/flags/emulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/csv"
"errors"
"fmt"
"strconv"
"strings"

"github.com/saucelabs/saucectl/internal/config"
Expand Down Expand Up @@ -54,6 +55,11 @@ func (e *Emulator) Set(s string) error {
e.Orientation = val
case "platformVersion":
e.PlatformVersions = []string{val}
case "armRequired":
e.ARMRequired, err = strconv.ParseBool(val)
if err != nil {
return fmt.Errorf("invalid value for armRequired: %w", err)
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions internal/saucecloud/espresso.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ func (r *EspressoRunner) newStartOptions(
DeviceType: d.deviceType,
DevicePrivateOnly: d.privateOnly,

// VMD specific settings
ARMRequired: d.armRequired,

// Configure device settings
RealDeviceKind: strings.ToLower(espresso.Android),
AppSettings: job.AppSettings{
Expand Down
Loading