Skip to content

Add option to bail out of jake runtests when a test fails #8925

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

Closed
wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 1, 2016

Currently serial only. For parallel we would need a way to notify all other running processes to stop.

@msftclas
Copy link

msftclas commented Jun 1, 2016

Hi @Andy-MS, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Andy Hanson). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@ghost ghost assigned sandersn Jun 1, 2016
@ghost ghost changed the title Add option to bail out of jake runtests on when a test fails Add option to bail out of jake runtests when a test fails Jun 1, 2016
@ghost ghost force-pushed the runtests_bail branch from 505c164 to 67e6687 Compare June 1, 2016 20:06
@sandersn
Copy link
Member

sandersn commented Jun 1, 2016

👍

For parallel runs, finishWorker used to call fail for all cases when errorStatus !== undefined. Now it only does so for the last worker. It would be easy to restore that fail call behind a check on --bail.

console.log(workerCmd);
exec(workerCmd, finishWorker, finishWorker)
});

function finishWorker(e, errorStatus) {
counter--;

if (bail && errorStatus !== undefined) {
failWithStatus(firstErrorStatus);
Copy link
Member

Choose a reason for hiding this comment

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

Does this fail with the correct number of errors? I don't think firstErrorStatus would be assigned until after the next if block.

I guess the fix would be to move below the next if block or just return errorStatus

@sandersn
Copy link
Member

sandersn commented Jun 3, 2016

I commented on the commit by mistake so it doesn't show up on this page.

@sandersn
Copy link
Member

Do you want to just drop the parallel commit? The parallel code is now very complex and it runs in 30-60 seconds, so there's not much point in bailing anyway.

@ghost
Copy link
Author

ghost commented Jun 13, 2016

Good idea. Replacing with #9146

@ghost ghost closed this Jun 13, 2016
@mhegazy mhegazy deleted the runtests_bail branch November 2, 2017 21:02
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants