Mesa (master): ci: Quick exit qpa extraction for non-matching qpas.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 28 16:43:12 UTC 2020


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue May 26 13:28:30 2020 -0700

ci: Quick exit qpa extraction for non-matching qpas.

When you're bringing up a new driver in CI with significant number of
failures (or when a CI run breaks a driver), the QPA extraction can easily
take the whole job timeout as we go about processing each QPA (100 of them
in my early VK CI fails) per unexpected result we're saving (50), which
involves reading and each line of the file in shell.  By quickly filtering
out the QPA files not including our test, we can save all that shell
overhead, bringing QPA extract time down to a couple of minutes.

Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5225>

---

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

diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh
index d6e04939c58..bcaa5d39afd 100755
--- a/.gitlab-ci/deqp-runner.sh
+++ b/.gitlab-ci/deqp-runner.sh
@@ -133,7 +133,13 @@ extract_xml_result() {
     shift 1
     qpas=$*
     start="#beginTestCaseResult $testcase"
-    for qpa in $qpas; do
+
+    # Pick the first QPA mentioning our testcase
+    qpa=`grep -l "$start" $qpas | head -n 1`
+
+    # If we found one, go extract just that testcase's contents from the QPA
+    # to a new QPA, then do testlog-to-xml on that.
+    if [ -n "$qpa" ]; then
         while IFS= read -r line; do
             if [ "$line" = "$start" ]; then
                 dst="$testcase.qpa"
@@ -155,7 +161,7 @@ extract_xml_result() {
                 return 1
             fi
         done < $qpa
-    done
+    fi
 }
 
 extract_xml_results() {



More information about the mesa-commit mailing list