From 10cef41d2509b40e927ac59562b89b708f39822c Mon Sep 17 00:00:00 2001 From: alyssa Date: Fri, 6 Sep 2024 16:38:39 +0900 Subject: [PATCH] test --- ci/run_ci.py | 2 ++ ci/spawn_jobs.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/run_ci.py b/ci/run_ci.py index 9257b7de..93eafa2f 100644 --- a/ci/run_ci.py +++ b/ci/run_ci.py @@ -64,6 +64,7 @@ def report_status(name, start_time, exit=None): response_code = e.getcode() response_data = e.read() print(f"{response_code} failed to update status {name}: {response_data}") + global global_fail global_fail = True def run_job(data): @@ -96,6 +97,7 @@ def main(): print("job failed!") traceback.format_exc() + global global_fail if global_fail: ok = False diff --git a/ci/spawn_jobs.py b/ci/spawn_jobs.py index 158a3f42..92e7144d 100755 --- a/ci/spawn_jobs.py +++ b/ci/spawn_jobs.py @@ -43,6 +43,7 @@ def spawn_job(name): response_code = e.getcode() response_data = e.read() print(f"{response_code} failed to spawn job {name}: {response_data}") + global global_fail global_fail = True def create_jobs(): @@ -103,7 +104,8 @@ def create_jobs(): if len(jobs) == 0: print("no jobs to run (??)") - return 0 if not global_fail else 1 + global global_fail + return 1 if global_fail else 0 if __name__ == "__main__": print("hello from python!")