]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
check: make results/check.log match everybody else
authorJosef Bacik <jbacik@fb.com>
Tue, 5 Apr 2016 01:45:41 +0000 (11:45 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 5 Apr 2016 01:45:41 +0000 (11:45 +1000)
results/check.log is inconsistent with what goes to stdout and $tmp.summary.  It
passes the ran and failed tests through fmt but not the "Not Run" tests for some
reason, and nobody else passes it through fmt.  So fix this to be the same
output as what goes to stdout and $tmp.summary to make for easier post parsing.
Now we'll get

Ran: <single line with all the tests>
Not run: <single line with all the not run tests>
Failures: <single line with all the failed tests>

Signed-off-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
check

diff --git a/check b/check
index 2986d84d84b2ae0f6f4bdad68ce22dd3fa0ae7d3..5be183f0083aa64862df0c52119f3f1d6c93450f 100755 (executable)
--- a/check
+++ b/check
@@ -342,17 +342,18 @@ END       { if (NR > 0) {
 
        echo "" >>$check.log
        date >>$check.log
-       echo $list | fmt | sed -e 's/^/    /' -e "s;$SRC_DIR/;;g" >>$check.log
-       $interrupt && echo "Interrupted!" >>$check.log
 
        echo "SECTION       -- $section" >>$tmp.summary
        echo "=========================" >>$tmp.summary
         if [ ! -z "$n_try" -a $n_try != 0 ]
        then
            echo "Ran:$try"
+           echo "Ran:$try" >>$check.log
            echo "Ran:$try" >>$tmp.summary
        fi
 
+       $interrupt && echo "Interrupted!" >>$check.log
+
        if [ ! -z "$notrun" ]
        then
            echo "Not run:$notrun"
@@ -364,7 +365,7 @@ END { if (NR > 0) {
        then
            echo "Failures:$bad"
            echo "Failed $n_bad of $n_try tests"
-           echo "Failures:$bad" | fmt >>$check.log
+           echo "Failures:$bad" >>$check.log
            echo "Failed $n_bad of $n_try tests" >>$check.log
            echo "Failures:$bad" >>$tmp.summary
            echo "Failed $n_bad of $n_try tests" >>$tmp.summary