Mesa (master): ci: Clean up some excessive use of pipes in dEQP results processing.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 27 22:27:14 UTC 2020


Module: Mesa
Branch: master
Commit: b8c66aeb9341d695c79a2d69935016919c42f843
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8c66aeb9341d695c79a2d69935016919c42f843

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 17 13:01:50 2020 -0700

ci: Clean up some excessive use of pipes in dEQP results processing.

Given that we use set -x in the script, this actually makes the user
experience of viewing logs nicer.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>

---

 .gitlab-ci/deqp-runner.sh | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index 2c3336d9d63..59cfd820214 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -242,11 +242,7 @@ DEQP_EXITCODE=$?
 if [ $DEQP_EXITCODE -ne 0 ]; then
     # preserve caselist files in case of failures:
     cp /tmp/deqp_runner.*.txt $RESULTS/
-    cat $RESULTSFILE | \
-        grep -v ",Pass" | \
-        grep -v ",Skip" | \
-        grep -v ",ExpectedFail" > \
-        $UNEXPECTED_RESULTSFILE.txt
+    egrep -v ",Pass|,Skip|,ExpectedFail" $RESULTSFILE > $UNEXPECTED_RESULTSFILE.txt
 
     if [ -z "$DEQP_NO_SAVE_RESULTS" ]; then
         echo "Some unexpected results found (see cts-runner-results.txt in artifacts for full results):"
@@ -259,17 +255,15 @@ if [ $DEQP_EXITCODE -ne 0 ]; then
         cat $UNEXPECTED_RESULTSFILE.txt
     fi
 
-    count=`cat $UNEXPECTED_RESULTSFILE.txt | wc -l`
+    count=`wc -l $UNEXPECTED_RESULTSFILE.txt`
 
     # Re-run fails to detect flakes.  But use a small threshold, if
     # something was fundamentally broken, we don't want to re-run
     # the entire caselist
 else
-    cat $RESULTSFILE | \
-        grep ",Flake" > \
-        $FLAKESFILE
+    grep ",Flake" $RESULTSFILE > $FLAKESFILE
 
-    count=`cat $FLAKESFILE | wc -l`
+    count=`wc -l $FLAKESFILE`
     if [ $count -gt 0 ]; then
         echo "Some flakes found (see cts-runner-flakes.txt in artifacts for full results):"
         head -n 50 $FLAKESFILE



More information about the mesa-commit mailing list