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
External tests script refactor #14064
Conversation
3486a83
to
5468baf
Compare
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.
Squash squash squash.
Some of the things I guess could be written in a more 'Pythonic' way, but honestly, it just makes the code less readable to me, so I'm perfectly fine with the way it is currently. Also, seeing as this doesn't really impact the CI at the moment, I'm fine with merging this and then improving incrementally when needed.
26fe47f
to
f1a27c2
Compare
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.
I'd still recommend removing the wrapper, but other than that, there are no major issues here.
d47b089
to
9024e52
Compare
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.
It's still using the shell to run the command. Getting rid of that was an important part of getting rid of the wrapper.
9024e52
to
957a727
Compare
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.
I was about to merge this, but at the last moment noticed a serious problem. The script stops after running a single test. It's easy to fix though.
957a727
to
b754128
Compare
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
b754128
to
28a9592
Compare
raise ExternalTestNotFound( | ||
f"External test(s) not found: {', '.join(unrecognized_tests)}" | ||
) | ||
run_test_scripts( |
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.
Just noticed that without the return this will now always raise the ExternalTestNotFound
exception. Will push the fix.
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.
See: #14170
Extracted from #13873 (comment).
The script allows running external tests by name (e.g. one, multiple or all external tests) and automatically detects their configuration scritps. I prefered to detect the configuration scripts automatically instead of hardcode the available external tests, to allow us to add/remove new tests without the need to modify the runner script.
The idea is that this script will be used as part of PR #13873 to run the external tests locally or via CI.