mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(cli): add --ios-device flag and IosDevice option
This commit is contained in:
1 parent
0ffe9f0a25
commit
4c21f4722a
2 files changed
+5
-2
No files matched your search
@@ -19,6 +19,7 @@ type testOptions struct {
|
||||
bundleID string
|
||||
platform string
|
||||
avd string
|
||||
iosDevice string
|
||||
duration time.Duration
|
||||
seed int64
|
||||
output string
|
||||
@@ -44,8 +45,9 @@ 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.platform, "platform", "android", "target platform: android, web")
|
||||
flagSet.StringVar(&options.platform, "platform", "android", "target platform: android, ios, web")
|
||||
flagSet.StringVar(&options.avd, "avd", "", "Android AVD name to boot if no device is connected")
|
||||
flagSet.StringVar(&options.iosDevice, "ios-device", "", "iOS simulator name or UDID to boot if none is running")
|
||||
flagSet.DurationVar(&options.duration, "duration", 5*time.Minute, "total test duration")
|
||||
flagSet.Int64Var(&options.seed, "seed", 0, "RNG seed (0 = random)")
|
||||
flagSet.StringVar(&options.output, "output", "./runs", "output directory for traces")
|
||||
@@ -61,7 +63,7 @@ func parseTestArgs(args []string, stderr io.Writer) (testOptions, error) {
|
||||
switch options.platform {
|
||||
case "android", "ios", "web":
|
||||
default:
|
||||
return testOptions{}, fmt.Errorf("unsupported platform: %q (android, web)", options.platform)
|
||||
return testOptions{}, fmt.Errorf("unsupported platform: %q (android, ios, web)", options.platform)
|
||||
}
|
||||
return options, nil
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ func runTestPipeline(ctx context.Context, options testOptions, stdout io.Writer)
|
||||
BundleID: options.bundleID,
|
||||
Platform: options.platform,
|
||||
AVD: options.avd,
|
||||
IosDevice: options.iosDevice,
|
||||
Duration: options.duration,
|
||||
Seed: options.seed,
|
||||
Output: options.output,
|
||||
|
||||
Reference in new issue
Block a user