-
Notifications
You must be signed in to change notification settings - Fork 428
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
parallel: drop --keep-order to stream test output with -j #826
base: master
Are you sure you want to change the base?
Conversation
624b534
to
3b24035
Compare
Hmmm, this isn't sufficient. |
Even if we we're only using parallel, without |
GNU Parallel doesn't interleave output by default (the management process waits for the job to finish then outputs the collected stdout and stderr in one go). You can enable interleaving with I can add |
Well then you still dont get intermediate Output, Theo only improvement would be to not wait on slower earlier tests. My plan is to replace parallel with the bats internal bash semaphores, which would allow custom handling of the output. |
The issue is that currently
If the plan is to repurpose the file-level semaphore stuff for the whole suite, fixing the file-level stuff to not wait for tests to finish in order is still necessary. |
Oh, now I see what you meant by:
Because even single-file test runs are run as a "suite" and we use GNU Parallel for suite runs, you won't get intermediate output because the whole file run needs to finish for GNU Parallel to output anything. That is really unfortunate... Yeah, I think the only "nice" solution would be to migrate the parallel logic in There are some other possible workarounds (prepending all lines from In any case, I'll push a version that allows for un-collated |
The Tap 14 specification explicitly allows for out-of-order Test Points, which means we do not need to use --keep-order. The primary benefit of doing this is that users will get more feedback during long test runs as to whether tests are passing or not. > Test Points *may* be output in any order, but any Test Point ID provided > must be within the range described by the Plan. Technically, Tap 13 didn't disallow out-of-order Test Points (and implies they are allowed) but at the time of implementing "bats -j" support this wasn't clear enough to justify the risk of producing spec-invalid output. Fixes: da65d1b ("bats: add support for parallel job execution with GNU parallel") Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
3b24035
to
eeaa352
Compare
The Tap 14 specification explicitly allows for out-of-order Test Points, which means we do not need to use --keep-order. The primary benefit of doing this is that users will get more feedback during long test runs as to whether tests are passing or not.
Technically, Tap 13 didn't disallow out-of-order Test Points (and implies they are allowed) but at the time of implementing "bats -j" support this wasn't clear enough to justify the risk of producing spec-invalid output.
Fixes: da65d1b ("bats: add support for parallel job execution with GNU parallel")
Signed-off-by: Aleksa Sarai cyphar@cyphar.com