Skip to content

Commit

Permalink
Attempts to sign frameworks and runner app
Browse files Browse the repository at this point in the history
Attempts to adhoc code sign the runner app itself and
its bundled frameworks during UI Testing to resolve
[ios_xctestrun_runner] codesigning/entitlements blockers bazelbuild#1912
  • Loading branch information
maxwellE committed Mar 26, 2023
1 parent 34939e5 commit 963a94a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apple/testing/default_runner/ios_xctestrun_runner.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ if [[ -n "$test_host_path" ]]; then
cp -R "$libraries_path/PrivateFrameworks/XCUIAutomation.framework" "$runner_app_frameworks_destination/XCUIAutomation.framework"
cp -R "$libraries_path/PrivateFrameworks/XCTAutomationSupport.framework" "$runner_app_frameworks_destination/XCTAutomationSupport.framework"
cp -R "$libraries_path/PrivateFrameworks/XCUnit.framework" "$runner_app_frameworks_destination/XCUnit.framework"
entitlements_path=$"$runner_app_destination/RunnerEntitlements.plist"
find "$runner_app_frameworks_destination" \
-name "*.framework" \
-exec codesign \
-f \
--entitlements \
"$entitlements_path" \
--timestamp=none \
-s - {} \; 2> "$test_tmp_dir/codesign_frameworks_stderr_logs.txt"
codesign \
-f \
--entitlements \
"$entitlements_path" \
--timestamp=none \
-s - "$runner_app_destination" \
2> "$test_tmp_dir/codesign_runner_app_stderr_logs.txt"
fi
else
xctestrun_test_host_path="__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest"
Expand Down

0 comments on commit 963a94a

Please sign in to comment.