2015-12-17 13:55-0600, Andrew Jones: > On Thu, Dec 17, 2015 at 06:53:41PM +0100, Radim Krčmář wrote: >> Might be interesting and hopefully won't break too many scripts. >> >> Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> >> --- >> v2: >> - don't print "0 unexpected failures" in run_tests' summary. [Drew] >> (This could have been done in lib/report, but I'm not sure why we want >> to always print it in the summary, so I've kept it there.) >> - use $testname >> - don't buffer the output (a serious bug in v1) >> - worse performance (reads the output of all tests) >> >> diff --git a/run_tests.sh b/run_tests.sh >> + __echo_last_log | sed 'x;$s/^SUMMARY: //;ta;$s/.*//p;d; >> + :a s/, 0 unexpected failures//;s/^/ (/;s/$/)/' > > This sed is way beyond my skillz. I would have just done the following > at the expense of an extra pipe :-) > > tac test.log | grep -m1 '^SUMMARY:' | sed 's/.*: \(.*\),.*/\1/' This won't print a newline in case there is no summary, but yeah, I will limit myself to the well known 's' command. (tail won't buffer the whole file and `head` instead of -m is POSIX.) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html