Skip to content

Commit

Permalink
Add error handling to resolver in case of broken symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
hwikle-lanl committed Dec 17, 2024
1 parent 7024df1 commit f46ff7c
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions lib/pavilion/resolver/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,21 @@ def find_all_tests(self):
else:
suites[name]['supersedes'].append(path)

# It's ok if the tests aren't completely validated. They
# may have been written to require a real host/mode file.
with path.open('r') as suite_file:
try:
suite_cfg = self._suite_loader.load(suite_file, partial=True)
except (TypeError,
KeyError,
ValueError,
yc_yaml.YAMLError) as err:
suites[name]['err'] = err
continue
try:
# It's ok if the tests aren't completely validated. They
# may have been written to require a real host/mode file.
with path.open('r') as suite_file:
try:
suite_cfg = self._suite_loader.load(suite_file, partial=True)
except (TypeError,
KeyError,
ValueError,
yc_yaml.YAMLError) as err:
suites[name]['err'] = err
continue
except FileNotFoundError as err:
# This can happen in the case of a broken symlink
suites[name]["err"] = err

base = self._loader.load_empty()

Expand Down

0 comments on commit f46ff7c

Please sign in to comment.