-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collect addional info in mixin #206
Conversation
eessi/testsuite/eessi_mixin.py
Outdated
try: | ||
software_subdir = sn.extractsingle(r'EESSI_SOFTWARE_SUBDIR: (?P<subdir>.*)$', | ||
f'{self.stagedir}/{self.stdout}', 'subdir', str) | ||
if software_subdir: | ||
self.cvmfs_software_subdir = f'{software_subdir}' | ||
except SanityError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
eessi/testsuite/eessi_mixin.py
Outdated
try: | ||
module_path = sn.extractsingle(r'FULL_MODULEPATH: (?P<modpath>.*)$', f'{self.stagedir}/{self.stdout}', | ||
'modpath', str) | ||
print(f"Full modulepath: {module_path}") | ||
if module_path: | ||
self.full_modulepath = f'{module_path}' | ||
except SanityError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Co-authored-by: Sam Moors <[email protected]>
…test-suite into collect_addional_info_in_mixin
…. This way, we don't need the try block.
one test fails, and the check hangs.
@casparvl any idea why this happens? EDIT: problem is dry-run, see suggestion below (i took the liberty to commit it directly into your PR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good after skipping extract_runtime_info_from_log
for dry-runs, thanks a lot @casparvl !
Solves #196
Note that the nodenames on which the test is run are already logged by the ReFrame framework, so we don't need to do that.
Discussed on the ReFrame slack channel. The challenge is that we want the variables from the batch nodes, so it has to be printed with
postrun_cmds
. But then, we need to get it from the output, and into a ReFramevariable
so that it is logged. Those need to be initialized in the class body. Then can be updated with the output of the extracted information. We use sanity functions to extract from the output, catching the SanityError that is produced if there is no match (as we don't want the test to fail because of this). Note that SanityError's are actually expected for runs on local software stack, since then theEESSI_*
environment variables are not set, and the pattern match fails. That's fine, we just want the variables to read'None'
in those cases.