make sure that test commands used in test_cases step are executable#5118
make sure that test commands used in test_cases step are executable#5118boegel merged 7 commits intoeasybuilders:developfrom
test_cases step are executable#5118Conversation
Scripts specified in the `tests` easyconfig parameter, especially from PRs, might not be executable. Temporarily make them executable to avoid failing with permission issues.
test_cases step are executable
|
|
||
| else: | ||
| test_cmd = test | ||
| if not os.path.exists(test_cmd): |
There was a problem hiding this comment.
Moving this check changes the logic: if test was a relative command, we now require that it specified an existing path, but that wasn't the case before.
This seems to lead to trouble with PyTorch (when forcing test_cases step to run when using --module-only):
Test specifies non-existing path: PyTorch-check-cpp-extension.py
I don't think we should be requiring that the file exists if it's a relative path?
There was a problem hiding this comment.
it should be the case before. Previously it did not require the path to exist if it was absolute as the check was only in the else-branch which seemed wrong
There was a problem hiding this comment.
Issue was unrelated: The PyTorch easyblock has special handling to use obtain_file in the fetch_step resolving this path.
When skipping that step the file will not be found.
Fix for that in #5162
Use a single try-except-finally block
As suggested by Python documentation
It will be printed at the end including command, environment and output.
Scripts specified in the
testseasyconfig parameter, especially from PRs, might not be executable.Temporarily make them executable to avoid failing with permission issues.
Add test for this step (currently missing)