Skip to content
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
merged 9 commits into from Feb 7, 2017
Merged

Fix hangs #49

merged 9 commits into from Feb 7, 2017

Conversation

vargon
Copy link
Contributor

@vargon vargon commented Feb 3, 2017

This incorporates the two tests that @ob added and includes fixes for detecting situations where the app fails to launch successfully, or we fail to detect that an app has frozen because the tests were not in the "Running" state. This also addresses an ask from @ob for a clearer message when the app crashes before tests have begun.

@vargon vargon requested review from ob and oliverhu February 3, 2017 15:40
@vargon vargon self-assigned this Feb 3, 2017
Copy link
Member

@ob ob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM – I added a few comments.

self.config.testing_CrashAppOnLaunch = YES;
self.config.testing_NoAppWillRun = NO;
BPExitStatus exitCode = [[[Bluepill alloc ] initWithConfiguration:self.config] run];
NSLog(@"%ld", (long)exitCode);
Copy link
Member

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).

// 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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testing_NoAppWillRun variable is for the parsing tests right? I would then maybe also use it in the kill() below where I am just looking for self.appPID == 0 for the same case.

@vargon vargon merged commit d35f56c into master Feb 7, 2017
@oliverhu oliverhu deleted the fix-hangs branch February 25, 2017 19:08
RainNapper pushed a commit to RainNapper/bluepill that referenced this pull request Jun 16, 2021
PyCQA/isort#1429 fixed --check's output so
that the error message and diff output are separated into STDERR and
STDOUT rather than combined in STDOUT. This means we need to update our
diff parsing function accordingly.

Also fix the version parsing routine to read from STDOUT. This was
busted for at least a few versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants