Skip to content

Commit

Permalink
skip submodules if extern directory is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
jornbr committed Mar 27, 2024
1 parent 7c6e84b commit 52e0307
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions util/developers/run_all_testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,13 @@ def clean(workdir: str):

# Add test cases from submodules (any file named fabm*.yaml)
extern_dir = os.path.join(FABM_BASE, "extern")
for source in sorted(os.listdir(extern_dir)):
extra_cases = glob.glob(os.path.join(extern_dir, source, "**/fabm*.yaml"))
if extra_cases:
print(f"Found {len(extra_cases)} additional test cases in extern/{source}")
for path in sorted(extra_cases):
testcases[f"{source}_{os.path.basename(path)[:-5]}"] = path
if os.path.isdir(extern_dir):
for source in sorted(os.listdir(extern_dir)):
extra_cases = glob.glob(os.path.join(extern_dir, source, "**/fabm*.yaml"))
if extra_cases:
print(f"Found {len(extra_cases)} additional test cases in extern/{source}")
for path in sorted(extra_cases):
testcases[f"{source}_{os.path.basename(path)[:-5]}"] = path

# Add additional institutes specified on command line (--ext),
# along with any contained test cases (any file named fabm*.yaml)
Expand Down

0 comments on commit 52e0307

Please sign in to comment.