diff --git a/api/saucectl.schema.json b/api/saucectl.schema.json index 527acfefb..fbdd261b7 100644 --- a/api/saucectl.schema.json +++ b/api/saucectl.schema.json @@ -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": [ diff --git a/api/v1alpha/framework/espresso.schema.json b/api/v1alpha/framework/espresso.schema.json index 7b2c41c8c..671529579 100644 --- a/api/v1alpha/framework/espresso.schema.json +++ b/api/v1alpha/framework/espresso.schema.json @@ -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": [ diff --git a/internal/espresso/config_test.go b/internal/espresso/config_test.go index dc1e38a93..38548cea9 100644 --- a/internal/espresso/config_test.go +++ b/internal/espresso/config_test.go @@ -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() @@ -233,6 +237,14 @@ suites: PlatformVersions: []string{ "8.1", }, + ARMRequired: false, + }, + { + Name: "Google Pixel 9 GoogleAPI Emulator", + PlatformVersions: []string{ + "8.2", + }, + ARMRequired: true, }, }}, }, diff --git a/internal/flags/emulator.go b/internal/flags/emulator.go index be7917509..4f6ffb6ad 100644 --- a/internal/flags/emulator.go +++ b/internal/flags/emulator.go @@ -4,6 +4,7 @@ import ( "encoding/csv" "errors" "fmt" + "strconv" "strings" "github.com/saucelabs/saucectl/internal/config" @@ -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) + } } } diff --git a/internal/saucecloud/espresso.go b/internal/saucecloud/espresso.go index bf3275174..bb2624c7d 100644 --- a/internal/saucecloud/espresso.go +++ b/internal/saucecloud/espresso.go @@ -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{