Skip to content

make sure that test commands used in test_cases step are executable#5118

Merged
boegel merged 7 commits intoeasybuilders:developfrom
Flamefire:test-cases-executable
Apr 8, 2026
Merged

make sure that test commands used in test_cases step are executable#5118
boegel merged 7 commits intoeasybuilders:developfrom
Flamefire:test-cases-executable

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

Scripts specified in the tests easyconfig 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)

Scripts specified in the `tests` easyconfig parameter, especially from PRs,
might not be executable.
Temporarily make them executable to avoid failing with permission issues.
@boegel boegel changed the title Make test_cases_step command executable make sure that test commands used in test_cases step are executable Apr 8, 2026
@boegel boegel removed the change label Apr 8, 2026
Comment thread test/framework/easyblock.py Outdated

else:
test_cmd = test
if not os.path.exists(test_cmd):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Flamefire and others added 3 commits April 8, 2026 12:34
Use a single try-except-finally block
It will be printed at the end including command, environment and output.
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit b66bff5 into easybuilders:develop Apr 8, 2026
40 checks passed
@Flamefire Flamefire deleted the test-cases-executable branch April 9, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants