-
Notifications
You must be signed in to change notification settings - Fork 337
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
Better shell specific testing #1136
Better shell specific testing #1136
Conversation
src/rez/tests/test_shells.py
Outdated
if sh_out[1]: | ||
raise Exception("Command failed:\n%s" % sh_out[1]) |
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 didn't use process.returncode
is because, it seems that powershell always return 0
even the command actually failed.
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.
Isn't this a case of powershell -File vs. -Command?
Only the latter passes the error code.
https://stackoverflow.com/questions/50200325/returning-an-exit-code-from-a-powershell-script
Or maybe $ErrorActionPreference = "Stop"
:
https://stackoverflow.com/questions/9948517/how-to-stop-a-powershell-script-on-the-first-error
The checks also need to happen form $LastExitCode
I believe:
https://stackoverflow.com/questions/10666035/difference-between-and-lastexitcode-in-powershell
What an over-engineered little shell :)
Edit
|
Github action cannot find any runner that matches Ubuntu version bumped in test matrix. |
fix rez-env output test is not testing on specified shell #1135,
also, able to exclude specific shells from testing with
@per_available_shell()
. This is currently as a helper feature for working ontest_rez_env_output
.Example usage as follow: