Skip to content

Commit

Permalink
Fixes wdarun support on random iOS 13 device submodels
Browse files Browse the repository at this point in the history
  • Loading branch information
Assad Ginem committed Jan 23, 2024
1 parent a49a358 commit aa058ae
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions ios/testmanagerd/xcuitestrunner_11.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,32 @@ func RunXCUIWithBundleIds11Ctx(
func startTestRunner11(pControl *instruments.ProcessControl, xctestConfigPath string, bundleID string,
sessionIdentifier string, testBundlePath string, wdaargs []string, wdaenv []string,
) (uint64, error) {
args := []interface{}{}
args := []interface{}{
"-NSTreatUnknownArgumentsAsOpen", "NO", "-ApplePersistenceIgnoreState", "YES",
}
for _, arg := range wdaargs {
args = append(args, arg)
}
env := map[string]interface{}{
"XCTestBundlePath": testBundlePath,
"XCTestConfigurationFilePath": xctestConfigPath,
"XCTestSessionIdentifier": sessionIdentifier,
"CA_ASSERT_MAIN_THREAD_TRANSACTIONS": "0",
"CA_DEBUG_TRANSACTIONS": "0",
"DYLD_INSERT_LIBRARIES": "/Developer/usr/lib/libMainThreadChecker.dylib",

"MTC_CRASH_ON_REPORT": "1",
"NSUnbufferedIO": "YES",
"OS_ACTIVITY_DT_MODE": "YES",
"SQLITE_ENABLE_THREAD_ASSERTIONS": "1",
"XCTestBundlePath": testBundlePath,
"XCTestConfigurationFilePath": xctestConfigPath,
"XCTestSessionIdentifier": sessionIdentifier,
}

for _, entrystring := range wdaenv {
entry := strings.Split(entrystring, "=")
key := entry[0]
value := entry[1]
env[key] = value
log.Debugf("adding extra env %s=%s", key, value)
log.Infof("adding extra env %s=%s", key, value)
}

opts := map[string]interface{}{
Expand Down

0 comments on commit aa058ae

Please sign in to comment.