gitlab-ci: create always the "results" directory with tracie
authorAndres Gomez <agomez@igalia.com>
Thu, 30 Apr 2020 19:49:58 +0000 (22:49 +0300)
committerAndres Gomez <agomez@igalia.com>
Wed, 13 May 2020 10:57:13 +0000 (13:57 +0300)
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@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4839>

.gitlab-ci/tracie/tests/test.sh
.gitlab-ci/tracie/tracie.py

index 5030e31e0496b2f70c18c8bb83987242a3354c6b..2f667fb8c60b0a98a295ac66036d7cde4ca06cc3 100755 (executable)
@@ -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"
index 8a494c2f56d5e22f59e57a9fbaf346965785e216..6e640b41ec14b755601fb12e91092b5edc6abdb1 100644 (file)
@@ -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)