-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hangs #49
Merged
Fix hangs #49
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cc8d748
Add a few test cases for when the app hangs/crashes on launch.
ob 68ef860
Fix for hanging and crashing before test run.
vargon 6dcb829
Some changes from @ob's feedback
vargon b1d9039
Clean up the message and use the new guard for detecting parsing tests.
ob ed8aff6
Fix the tests.
ob f4000da
Force a build -- tests are passing locally (ran 4x)
vargon fe6a56b
Force a build -- tests are passing locally (ran 4x) -- timed out on T…
vargon 840c41d
Add dump of current commits vs. master to start of script
vargon ac544d6
Lower timeout test timeout from 5 seconds to 2.
vargon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,6 +308,20 @@ - (void)checkProcessWithContext:(BPExecutionContext *)context { | |
return; | ||
} | ||
|
||
// This check should be last after all of the more specific tests | ||
// It checks if the app is even running, which it must be at this point | ||
// If it's not running and we passed the above checks (e.g., the tests are not yet completed) | ||
// then it must mean the app has crashed. | ||
// However, we have a short-circuit for tests because those may not actually run any app | ||
if (!isRunning && context.pid > 0 && !self.config.testing_NoAppWillRun) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
// The tests ended before they even got started or the process is gone for some other reason | ||
[[BPStats sharedStats] endTimer:RUN_TESTS(context.attemptNumber)]; | ||
[BPUtils printInfo:ERROR withString:@"Application crashed before tests started!"]; | ||
[[BPStats sharedStats] addApplicationCrash]; | ||
[self deleteSimulatorWithContext:context andStatus:BPExitStatusAppCrashed]; | ||
return; | ||
} | ||
|
||
NEXT([self checkProcessWithContext:context]); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove these NSLog (and the one in the next function).