File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Bluepill-cli/Bluepill-cli/Simulator Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -204,15 +204,15 @@ - (void)onOutputReceived:(NSString *)output {
204
204
}
205
205
206
206
- (void )stopTestsWithErrorMessage : (NSString *)message forTestName : (NSString *)testName inClass : (NSString *)testClass {
207
- NSError *error = nil ;
208
207
209
208
// Timeout or crash on a test means we should skip it when we rerun the tests
210
209
[self updateExecutedTestCaseList: testName inClass: testClass];
211
210
212
211
if (![[self .device stateString ] isEqualToString: @" Shutdown" ]) {
213
- [self .device terminateApplicationWithID: self .hostBundleId error: &error];
214
- if (error) {
215
- fprintf (stderr, " stopTests: %s \n " , [[error description ] UTF8String ]);
212
+ // self.appPID can be zero when running the parsing tests
213
+ // since we're not actually creating a simulator and running an app.
214
+ if (self.appPID && (kill (self.appPID , SIGTERM) < 0 )) {
215
+ perror (" kill" );
216
216
}
217
217
}
218
218
Original file line number Diff line number Diff line change @@ -283,6 +283,7 @@ - (void)launchApplicationAndExecuteTestsWithParser:(BPTreeParser *)parser andCom
283
283
dispatch_source_cancel (source);
284
284
});
285
285
__block __weak SimulatorRunner *weakSelf = self;
286
+ weakSelf.monitor .appPID = pid;
286
287
dispatch_source_set_cancel_handler (source, ^{
287
288
// Post a APPCLOSED signal to the fifo
288
289
[weakSelf.stdOutHandle writeData: [@" \n BP_APP_PROC_ENDED\n " dataUsingEncoding: NSUTF8StringEncoding]];
You can’t perform that action at this time.
0 commit comments