On 07/22/2012 09:24 AM, Akim Demaille wrote: > > Le 21 juil. 2012 à 10:50, Stefano Lattarini a écrit : > >> See long-standing automake bug#7868. >> >> * t/parallel-tests-many.sh: Simplify and enhance. Among the other things, > > I would s/the //. > Will fix.
>> this test now tries running ~ 30 thousands tests. Currently fails on > > I would also 30,000, I don't like too much mixing digits with > letters, or maybe "30k tests". > "30k" is fine with me, I'll use it. > Just a matter of taste, and just to write something to show I truly > read the patch :) > Eh eh ;-) >> several systems (e.g., Linux 2.6.30 on i686, Solaris 10 on i86pc). > >> +list_logs | grep . && exit 1 > > Back to our regular "let's upgrade Akim's view of portable shell > programming": are there really today shells used to run the test > suite that do not support "!"? > Nope, the testsuite now requires a POSIX shell. But I still find the use of "SOME-CMD | CMD-EXPECTED-TO-FAIL && exit 1" more readable than the possible alternatives (more details below). > I personally use it extensively in my test suites, as I find this > much more legible: > > ! list_logs | grep . > Ah, but this doesn't do what you expect: $ bash -c '! echo x | grep .'; echo st = $? x st = 0 $ bash -c '! echo | grep .'; echo st = $? st = 1 To "deny" the pipeline, you need to enclose it in "()" or "{}": $ bash -c '! (echo x | grep .)'; echo st = $? x st = 1 $ bash -c '! (echo | grep .)'; echo st = $? st = 0 Which proves that my preferred idiom was actually clear :-) Thanks, Stefano