-
Notifications
You must be signed in to change notification settings - Fork 8
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
Test runner always returns 0, environment variables are not exported to parent shell #23
Comments
In the current state of things, the test runner always succeeds, and it is the expectation that the results will need to be parsed. As far as the "environment variables" used here, in this case the |
@benbrackenc74 Thank you for your response.
I’m not sure I follow this. Whether I run (on macOS) ruby -e 'system("ruby test.rb /Applications/Max.app")' \
-e 'puts ENV.keys' or ruby -e 'require "open3"' \
-e 'stdout, stderr = Open3.capture3("ruby test.rb /Applications/Max.app")' \
-e 'puts stdout' \
-e 'puts stderr' \
-e 'puts ENV.keys' or ruby -e 'pid = spawn("ruby test.rb /Applications/Max.app")' \
-e 'Process.wait pid' \
-e 'puts ENV.keys' I do not see |
I've done something like this before using in env_sub.rb: in env_main.rb:
|
Thank you again for responding. The problem with using Line 291 in 7097a11
This means something like ruby -e 'require("./test.rb")' \
-e 'puts ENV.keys' \
/Applications/Max.app cannot work. Ruby exits immediately after the call to It seems like the most straightforward way to fix this (that is, to get a usable exit code) is to patch the last line of test.rb. |
Currently, the test runner always returns 0:
max-test/ruby/test.rb
Line 291 in 7097a11
This means that, for example, if max-test is used in GitHub Actions, the action always succeeds regardless of whether any tests fail.
A potential workaround might be to check the result of the
MAXTEST_PASS
environment variable:max-test/ruby/test.rb
Lines 275 to 277 in 7097a11
However, environment variables set this way are not (and indeed can’t be) exported to the parent process, as can be seen by running:
The text was updated successfully, but these errors were encountered: