mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(testrun): launch iOS app via XCTest with env vars instead of simctl
This commit is contained in:
1 parent
003aba9ea2
commit
bff3a49324
3 files changed
+40
-19
No files matched your search
@@ -69,6 +69,15 @@ func LaunchApp(ctx context.Context, bundleID string, env map[string]string) erro
|
||||
return nil
|
||||
}
|
||||
|
||||
// BootedUDID returns the UDID of the currently booted iOS simulator, or "" if none is booted.
|
||||
func BootedUDID(ctx context.Context) string {
|
||||
d, _ := bootedSimulator(ctx)
|
||||
if d == nil {
|
||||
return ""
|
||||
}
|
||||
return d.UDID
|
||||
}
|
||||
|
||||
func bootedSimulator(ctx context.Context) (*simDevice, error) {
|
||||
out, err := exec.CommandContext(ctx, "xcrun", "simctl", "list", "devices", "booted", "--json").Output()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user