From b7f826abb1076466b67449ad397e847e272b3ced Mon Sep 17 00:00:00 2001 From: Adam Dempsey Date: Tue, 26 Nov 2024 16:26:21 -0700 Subject: [PATCH] if on a backend, check SLURM_CLUSTER_NAME --- tst/launch_ci_runner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tst/launch_ci_runner.py b/tst/launch_ci_runner.py index d9ac746..1406dba 100755 --- a/tst/launch_ci_runner.py +++ b/tst/launch_ci_runner.py @@ -138,9 +138,13 @@ def run_tests_in_temp_dir(pr_number, head_repo, head_ref, commit_sha): else: # Check that we are on the right system hostname = socket.gethostname() + cluster = os.getenv("SLURM_CLUSTER_NAME") + if not fnmatch.fnmatch(hostname, "darwin-fe*"): - print("ERROR script must be run from Darwin frontend node!") - sys.exit(1) + # if we are on a backend + if cluster.lower() != "darwin": + print("ERROR script must be run from Darwin!") + sys.exit(1) # Execute the sbatch command try: