Issue #14626 has been updated by MSP-Greg (Greg L).


> but do I need to run

Most build systems do perform `configure`, `make`, and `make install` before testing.

If you want to run tests on an existing build, you can run something like the following (when in the test folder):

```
ruby runner.rb --show-skip -I./lib rubygems
ruby runner.rb --show-skip -I./lib rubygems/test_require.rb
```

Re your particular issue, it's odd, as this test is passing in many other builds, but as I recall (I'm a windows guy), MacOS uses clang(?)

Anyway, the assert immediately before your failure is requiring the file defining the HELLO constant, and it's not generating a failure.  So, either a different file is being loaded (unlikely), or your build isn't parsing the file generated by the following:

```
File.open(c_rb, 'w') { |f| f.write "class Object; HELLO = 'world' end" }
```

You might try using that statement with an appropriate filename, require the file, and see if the constant exists.  Then again, I keep thinking something is really strange, or, I'm missing something.  There have been changes that involve parsing, maybe the string needs a "\n" at the end?  Just a wild guess...

Greg

----------------------------------------
Bug #14626: One failing test on trunk 58fbe69a5b and OSX
https://bugs.ruby-lang.org/issues/14626#change-71190

* Author: Benoit_Tigeot (Benoit Tigeot)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I'm using ruby/trunk on 58fbe69a5b. When I run *make test-all TESTS='rubygems/test_require.rb'*

~~~ text
Run options: "--ruby=./miniruby -I../ruby/lib -I. -I.ext/common  ../ruby/tool/runruby.rb --extout=.ext  -- --disable-gems" --excludes-dir=../ruby/test/excludes --name=!/memory_leak/

# Running tests:

[ 2/21] TestGemRequire#test_dash_i_beats_gems = 0.05 s
  1) Error:
TestGemRequire#test_dash_i_beats_gems:
NameError: uninitialized constant HELLO
    /Users/bti/code/ruby/test/rubygems/test_require.rb:65:in `test_dash_i_beats_gems'

Finished tests in 0.656300s, 31.9976 tests/s, 135.6087 assertions/s.
21 tests, 89 assertions, 0 failures, 1 errors, 1 skips
~~~

Here are my current environment details:

* osx 10.13.2
* ruby trunk 58fbe69a5b

Is their a guide somewhere for git bisecting ruby trunk. I'm using https://github.com/ko1/rubyhackchallenge/blob/master/EN/2_mri_structure.md#assumptions and I'm not sure about the best way of doing it.

I'm running *make test-all* from my *build* folder but do I need to run *../ruby/configure ....* and *make install* everytime I checkout a previous version? I feel dumb of asking those questions.

Thanks a lot in advance




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>