On Tue, Apr 21, 2015 at 9:42 PM, Martin d'Anjou <[email protected]> wrote: > Hi Ole, > > When I run parametrized tests and the failure rate exceeds a certain > threshold, I need to kill the remaining running tests and abort with non > zero and without starting new tests. > > GNU Parallel supports --halt with a positive percentage, I was thinking it > could support this feature when a negative percentage. > > Does that sound good?
So the current --halt X% works similar to --halt 1. As I understand you want a --halt with % that works similar to --halt 2. I am a bit reluctant to let -X% be similar to 2, because it is not symetrical with --halt -1 and --halt -2 (which look at successes). Another idea is to let even percentage be similar to --halt 2, while odd percentages behave like --halt 1: 1-99% (odd numbers) If val% of the jobs fail and minimum 3: Do not start new jobs, but complete the running jobs including cleanup. The exit status will be the exit status from the last failing job. 2-100% (even numbers) If val% of the jobs fail and minimum 3: Kill off all jobs immediately and exit without cleanup. The exit status will be the exit status from the failing job. I am not really sure if any of those adhere to the Principle of Least Astonishment. Can we find a better way to express the meaning and which is not surprising to the user? > I will attempt to change the code to do this, but so far you have beaten me > to the punch each time :-) Showing an example of how it could be implemented is often a good way for me to get inspired to improve the implementation, so it should not hold you back. /Ole
