feat(driver): optional launcher_activity on Launch RPC for multi-alias apps

This commit is contained in:
pj committed 2026-04-18 01:59:36 +07:00
1 parent 6d81e24e71
commit c4cf0ff530
11 files changed
+69 -64

No files matched your search

+9 -7
View File
@@ -11,13 +11,14 @@ import (
)
type testOptions struct {
spec string
bundleID string
platform string
avd string
duration time.Duration
seed int64
output string
spec string
bundleID string
launcherActivity string
platform string
avd string
duration time.Duration
seed int64
output string
}
const topUsage = `uatu is a property-based UI fuzzer for mobile apps.
@@ -38,6 +39,7 @@ func parseTestArgs(args []string, stderr io.Writer) (testOptions, error) {
var options testOptions
flagSet.StringVar(&options.spec, "spec", "", "path to the TypeScript spec (required)")
flagSet.StringVar(&options.bundleID, "bundle-id", "", "target app bundle ID (required)")
flagSet.StringVar(&options.launcherActivity, "launcher-activity", "", "optional <pkg>/<activity> to launch (overrides default resolution)")
flagSet.StringVar(&options.platform, "platform", "android", "target platform: android (ios deferred)")
flagSet.StringVar(&options.avd, "avd", "", "Android AVD name (required on android)")
flagSet.DurationVar(&options.duration, "duration", 5*time.Minute, "total test duration")
+1 -1
View File
@@ -116,7 +116,7 @@ func runTestPipeline(ctx context.Context, options testOptions, stdout io.Writer)
acceptChannel <- acceptResult{connection: connection, err: acceptErr}
}()
if err := driverClient.Launch(ctx, options.bundleID, false); err != nil {
if err := driverClient.Launch(ctx, options.bundleID, options.launcherActivity, false); err != nil {
return fmt.Errorf("launch app: %w", err)
}
fmt.Fprintf(stdout, "launched %s; waiting for SDK to connect (%.0fs timeout)\n", options.bundleID, sdkAcceptTimeout.Seconds())