mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(cli): add --android-app-path for clear-state reinstall
Wires the APK path from the test command through to the sidecar client so Android clear-state can reset apps on OEM builds that deny pm clear.
This commit is contained in:
1 parent
015f619693
commit
921ecb910e
4 files changed
+33
-28
No files matched your search
@@ -170,6 +170,7 @@ func buildDriver(ctx context.Context, options Options, stdout io.Writer) (driver
|
||||
return nil, nil, fmt.Errorf("dial sidecar: %w", err)
|
||||
}
|
||||
driverClient.SetPlatform(options.Platform)
|
||||
driverClient.SetClearStateReinstall(options.Device, options.AndroidAppPath, stdout)
|
||||
// WaitForHealth confirms the gRPC sidecar is up. For iOS, the WDA warmup
|
||||
// (absorbing the XCUITest startup race) runs inside IosDriverBackend.init
|
||||
// in the sidecar - no additional sleep needed here.
|
||||
|
||||
+12
-11
@@ -22,17 +22,18 @@ const sidecarStartupTimeout = 30 * time.Second
|
||||
|
||||
// Options are the parameters for a single test pipeline run.
|
||||
type Options struct {
|
||||
Spec string
|
||||
BundleID string
|
||||
Platform string
|
||||
AVD string
|
||||
Device string
|
||||
IosDevice string
|
||||
IosAppPath string
|
||||
Duration time.Duration
|
||||
Seed int64
|
||||
Output string
|
||||
ClearData bool
|
||||
Spec string
|
||||
BundleID string
|
||||
Platform string
|
||||
AVD string
|
||||
Device string
|
||||
IosDevice string
|
||||
IosAppPath string
|
||||
AndroidAppPath string
|
||||
Duration time.Duration
|
||||
Seed int64
|
||||
Output string
|
||||
ClearData bool
|
||||
|
||||
// iosUDID, iosIsSimulator, and iosCoreDeviceID are filled by Execute after
|
||||
// resolving the iOS target, then read by buildDriver to choose the simulator
|
||||
|
||||
Reference in new issue
Block a user