Skip to content

Commit 1d2af5b

Browse files
Adjusted how we send the kill command through Process, also removed a couple workflow steps that may have killed the simulator
1 parent 4b57e32 commit 1d2af5b

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/pr_validation.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ jobs:
236236
echo "Checking for app's container on the booted simulator:"
237237
xcrun simctl get_app_container booted com.flutterbountyhunters.deeplinks.example
238238
239-
- name: Kill any simctl processes
240-
run: pkill -f runner
241-
242-
- name: Check for other processes using the simulator
243-
run: ps aux | grep simctl
239+
# - name: Kill any simctl processes
240+
# run: pkill -f runner
241+
#
242+
# - name: Check for other processes using the simulator
243+
# run: ps aux | grep simctl
244244

245245
# - name: Launch the app on the simulator just to prove we can
246246
# run: |

packages/flutter_test_runners/lib/src/platform_comms/ios/xcrun.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Xcrun {
130130
print("Sending xcrun simctl terminate command...");
131131
final process = await Process.start(
132132
"sh",
133-
["-c", "xcrun", "simctl", "terminate", "booted", appBundleId],
133+
["-c", "xcrun simctl terminate booted $appBundleId"],
134134
);
135135
print("terminate command process was started");
136136

@@ -167,9 +167,12 @@ class Xcrun {
167167
// );
168168
}
169169

170-
static Future<ProcessResult> _runInShell(List<String> commandAndArgs) {
170+
static Future<ProcessResult> _runInShell(List<String> commandAndArgs) async {
171171
print("Sending shell command: '${commandAndArgs.join(" ")}'");
172-
return Process.run("sh", ["-c", ...commandAndArgs]);
172+
final result = await Process.run("sh", ["-c", ...commandAndArgs]);
173+
print("Shell command exit code: ${result.exitCode}");
174+
return result;
175+
173176
// return Process.run(
174177
// commandAndArgs.first,
175178
// commandAndArgs.length > 1 ? commandAndArgs.sublist(1) : [],

0 commit comments

Comments
 (0)