Comments (4)
Thank you again for responding.
The problem with using require
here is that test.rb ends with a call to exit
:
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 require
, and the puts
is never reached.
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.
from max-test.
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 ENV
class is used to pass on the variable to a parent ruby process, nothing more. So if you had a parent ruby script that spawned test.rb, it should have access to these variables.
from max-test.
@benbrackenc74 Thank you for your response.
So if you had a parent ruby script that spawned test.rb, it should have access to these variables.
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 MAXTEST
or MAXTEST_PASS
among ENV.keys
. Is there some other way to spawn a Ruby process that Iām missing?
from max-test.
I've done something like this before using require
:
in env_sub.rb:
ENV['AN_ENV_VARIABLE'] = 'cool!'
in env_main.rb:
require './env_sub.rb'
puts ENV['AN_ENV_VARIABLE']
from max-test.
Related Issues (16)
- Patchers/projects seem to be closed lazily HOT 5
- Consider significant improvements
- Hang at "Sending ping to Max." HOT 5
- How to build max-test for 64-bit Windows ? HOT 1
- Location of DB Results should user-relative rather than app-relative HOT 1
- rosc errors with newer versions of Ruby
- oscar: handle patchers missing test.terminate objects without hanging
- test.equals: expand to cover more data-types
- test.equals: attribute for specifying relevant decimal places to compare HOT 1
- oscar: test summary in max window
- Errors following video example on new install, Max 8.13, High Sierra HOT 2
- floating-point comparison improvements HOT 1
- Max hangs until mouse moves HOT 7
- Multiple copies of the Max running? HOT 1
- Can't open a copy of Max with spaces in the filename HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from max-test.