Skip to content

Commit c1bdc20

Browse files
Pass runner PID to simulator create/clean up actions (#2899)
Needed for some implementations to do proper simulator lease and release. Signed-off-by: Brentley Jones <github@brentleyjones.com>
1 parent eed702e commit c1bdc20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apple/testing/default_runner/ios_xctestrun_runner.template.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ if [[ "$build_for_device" == false ]]; then
404404
exit 1
405405
fi
406406

407-
simulator_id="$(SIMULATOR_DEVICE_TYPE="%(device_type)s" SIMULATOR_OS_VERSION="%(os_version)s" SIMULATOR_REUSE_SIMULATOR="${reuse_simulator:-}" SIMULATOR_SDK_VERSION="%(sdk_version)s" "%(create_simulator_action_binary)s")"
407+
simulator_id="$(SIMULATOR_DEVICE_TYPE="%(device_type)s" SIMULATOR_OS_VERSION="%(os_version)s" SIMULATOR_REUSE_SIMULATOR="${reuse_simulator:-}" SIMULATOR_SDK_VERSION="%(sdk_version)s" XCTESTRUN_RUNNER_PID="${BASHPID:-$$}" "%(create_simulator_action_binary)s")"
408408
fi
409409

410410
test_exit_code=0
@@ -662,7 +662,7 @@ if [[
662662
rm -r "$result_bundle_path"
663663
fi
664664

665-
SIMULATOR_UDID="$simulator_id" SIMULATOR_REUSE_SIMULATOR="${reuse_simulator:-}" "%(clean_up_simulator_action_binary)s"
665+
SIMULATOR_UDID="$simulator_id" SIMULATOR_REUSE_SIMULATOR="${reuse_simulator:-}" XCTESTRUN_RUNNER_PID="${BASHPID:-$$}" "%(clean_up_simulator_action_binary)s"
666666

667667
if [[ "$post_action_determines_exit_code" == true ]]; then
668668
if [[ "$post_action_exit_code" -ne 0 ]]; then

0 commit comments

Comments
 (0)