ci/tracie: Print the path if the trace isn't found.
authorEric Anholt <eric@anholt.net>
Wed, 10 Jun 2020 02:01:06 +0000 (19:01 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 25 Jun 2020 17:33:28 +0000 (17:33 +0000)
I hit this a few times while setting up CI.

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

.gitlab-ci/tracie/tracie.py

index 854ba8a17c5b30c931679d8714dd0aa79fe38d8f..59016cae164c13f916442bfb143771b3be974f31 100644 (file)
@@ -85,7 +85,9 @@ def gitlab_ensure_trace(project_url, repo_commit, trace):
     trace_path = TRACES_DB_PATH + trace['path']
     if project_url is None:
         assert(repo_commit is None)
-        assert(os.path.exists(trace_path))
+        if not os.path.exists(trace_path):
+            print("{} missing".format(trace_path))
+            sys.exit(1)
         return
 
     os.makedirs(os.path.dirname(trace_path), exist_ok=True)