ci: fix reporting the number of unexpected/flakes
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 30 Apr 2020 09:40:42 +0000 (11:40 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 07:51:44 +0000 (07:51 +0000)
`wc -l $file` returns the number of lines and the filename.

Fixes: b8c66aeb934 ("ci: Clean up some excessive use of pipes in dEQP results processing.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4829>

.gitlab-ci/deqp-runner.sh

index d4de8f74baf9b0b8ffabb4409cd013ded2d0cc1b..48d95b2bedd03f1a76aaae1b462f98aa6de4973e 100755 (executable)
@@ -259,7 +259,7 @@ if [ $DEQP_EXITCODE -ne 0 ]; then
         cat $UNEXPECTED_RESULTSFILE.txt
     fi
 
-    count=`wc -l $UNEXPECTED_RESULTSFILE.txt`
+    count=`cat $UNEXPECTED_RESULTSFILE.txt | wc -l`
 
     # Re-run fails to detect flakes.  But use a small threshold, if
     # something was fundamentally broken, we don't want to re-run
@@ -267,7 +267,7 @@ if [ $DEQP_EXITCODE -ne 0 ]; then
 else
     grep ",Flake" $RESULTSFILE > $FLAKESFILE
 
-    count=`wc -l $FLAKESFILE`
+    count=`cat $FLAKESFILE | wc -l`
     if [ $count -gt 0 ]; then
         echo "Some flakes found (see cts-runner-flakes.txt in artifacts for full results):"
         head -n 50 $FLAKESFILE