From 51ace0288899cf79d4803095f3f749dc085d71f0 Mon Sep 17 00:00:00 2001 From: Miguel Andres-Martinez Date: Fri, 6 Mar 2026 11:56:45 +0100 Subject: [PATCH 1/2] add hostfiles to the tracked files in last_tested for esm_tests (cherry picked from commit 29e7a6989218203b68f6c2c67e53b126b1035aef) --- src/esm_tests/test_utilities.py | 18 ++++++++++++++++++ src/esm_tests/tests.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/esm_tests/test_utilities.py b/src/esm_tests/test_utilities.py index 931bb2e2a..4f302c543 100644 --- a/src/esm_tests/test_utilities.py +++ b/src/esm_tests/test_utilities.py @@ -347,6 +347,24 @@ def get_rel_paths_compare_files(info, cfile, v, this_test_dir): num = 1 subpaths.append(f"{cf_path}/{cfiles[num].split('/')[-1]}") break + elif cfile == "hostfiles": + # Collect all hostfile_* files from the scripts folder of the first run_ directory + ctype = "scripts" + ldir = os.listdir(f"{user_info['test_dir']}/{this_test_dir}") + ldir.sort() + for f in ldir: + # Take the first run directory + if "run_" in f: + cf_path = f"{this_test_dir}/{f}/{ctype}/" + cfiles = glob.glob(f"{user_info['test_dir']}/{cf_path}/hostfile_*") + # If not found, try in the general directory + if len(cfiles) == 0: + cf_path = f"{this_test_dir}/{ctype}/" + cfiles = glob.glob(f"{user_info['test_dir']}/{cf_path}/hostfile_*") + cfiles.sort() + for hf in cfiles: + subpaths.append(f"{cf_path}/{hf.split('/')[-1]}") + break elif cfile == "namelists": # Get path of the finished_config s_config_yaml, _ = get_rel_paths_compare_files( diff --git a/src/esm_tests/tests.py b/src/esm_tests/tests.py index 004f3c881..c7f945fc9 100644 --- a/src/esm_tests/tests.py +++ b/src/esm_tests/tests.py @@ -19,7 +19,7 @@ # Define default files for comparisson compare_files = { "comp": ["comp-"], - "run": [".run", "finished_config", "namelists"], + "run": [".run", "finished_config", "namelists", "hostfiles"], } """ From 2d549509976ef945c1a9e29fc27dc427b0ce8d64 Mon Sep 17 00:00:00 2001 From: Miguel Andres-Martinez Date: Mon, 9 Mar 2026 08:39:34 +0100 Subject: [PATCH 2/2] add hostfiles ot files tracked for esm_tests (cherry picked from commit 1dd65d83566e9288ebd691d88a2acd788df76edb) --- src/esm_tests/output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esm_tests/output.py b/src/esm_tests/output.py index 7a8b4745c..6250bdcb7 100644 --- a/src/esm_tests/output.py +++ b/src/esm_tests/output.py @@ -19,7 +19,7 @@ # Define default files for comparisson compare_files = { "comp": ["comp-"], - "run": [".run", "finished_config", "namelists"], + "run": [".run", "finished_config", "namelists", "hostfiles"], }