Skip to content

Commit 4e14f06

Browse files
committed
[GR-17722] JT: use the correct post_install_hook file in test_cexts and for unit tests
1 parent cb25951 commit 4e14f06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tool/jt.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ def ruby_launcher
215215
end
216216
alias_method :require_ruby_launcher!, :ruby_launcher
217217

218+
def ruby_home
219+
File.expand_path('../..', ruby_launcher)
220+
end
221+
218222
def truffleruby_native!
219223
unless truffleruby_native?
220224
raise "The ruby executable #{ruby_launcher} is not native."
@@ -908,7 +912,7 @@ def test(*args)
908912
# TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
909913
# The home needs to be set, otherwise TruffleFile does not allow access to files in the TruffleRuby home,
910914
# because it cannot find the correct home.
911-
home = "-Druby.home=#{TRUFFLERUBY_DIR}/mxbuild/truffleruby-jvm/#{language_dir}/ruby"
915+
home = "-Druby.home=#{ruby_home}"
912916
mx 'unittest', home, *tests
913917
when 'tck' then mx 'tck', *rest
914918
else
@@ -1144,7 +1148,7 @@ def retag(*args)
11441148

11451149
# Test that running the post-install hook works, even when opt &
11461150
# llvm-link are not on PATH, as it is the case on macOS.
1147-
sh({'TRUFFLERUBY_RECOMPILE_OPENSSL' => 'true'}, "mxbuild/truffleruby-jvm/#{language_dir}/ruby/lib/truffle/post_install_hook.sh")
1151+
sh({'TRUFFLERUBY_RECOMPILE_OPENSSL' => 'true'}, "#{ruby_home}/lib/truffle/post_install_hook.sh")
11481152

11491153
when 'gems'
11501154
# Test that we can compile and run some real C extensions

0 commit comments

Comments
 (0)