Mesa (master): gitlab-ci: create always the "results" directory with tracie

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 13 11:24:42 UTC 2020


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

Author: Andres Gomez <agomez at igalia.com>
Date:   Thu Apr 30 22:49:58 2020 +0300

gitlab-ci: create always the "results" directory with tracie

Otherwise, we will fail when the traces description file doesn't
contain any checksum for the specified device.

Fixes: efbbf8bb81e ("tracie: Print results in a machine readable format")
Signed-off-by: Andres Gomez <agomez at igalia.com>
Reviewed-by: Rohan Garg <rohan.garg at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4839>

---

 .gitlab-ci/tracie/tests/test.sh | 1 +
 .gitlab-ci/tracie/tracie.py     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.gitlab-ci/tracie/tests/test.sh b/.gitlab-ci/tracie/tests/test.sh
index 5030e31e049..2f667fb8c60 100755
--- a/.gitlab-ci/tracie/tests/test.sh
+++ b/.gitlab-ci/tracie/tests/test.sh
@@ -86,6 +86,7 @@ tracie_fails_on_image_mismatch() {
 }
 
 tracie_skips_traces_without_checksum() {
+    echo "traces:" > "$TEST_DIR/tests/traces.yml"
     echo "  - path: trace1/red.testtrace" >> "$TEST_DIR/tests/traces.yml"
     echo "    expectations:" >> "$TEST_DIR/tests/traces.yml"
     echo "    - device: bla" >> "$TEST_DIR/tests/traces.yml"
diff --git a/.gitlab-ci/tracie/tracie.py b/.gitlab-ci/tracie/tracie.py
index 8a494c2f56d..6e640b41ec1 100644
--- a/.gitlab-ci/tracie/tracie.py
+++ b/.gitlab-ci/tracie/tracie.py
@@ -165,6 +165,7 @@ def main():
                 all_ok = all_ok and ok
                 results.update(result)
 
+    os.makedirs(RESULTS_PATH, exist_ok=True)
     with open(os.path.join(RESULTS_PATH, 'results.yml'), 'w') as f:
         yaml.safe_dump(results, f, default_flow_style=False)
 



More information about the mesa-commit mailing list