@@ -215,6 +215,10 @@ def ruby_launcher
215
215
end
216
216
alias_method :require_ruby_launcher! , :ruby_launcher
217
217
218
+ def ruby_home
219
+ File . expand_path ( '../..' , ruby_launcher )
220
+ end
221
+
218
222
def truffleruby_native!
219
223
unless truffleruby_native?
220
224
raise "The ruby executable #{ ruby_launcher } is not native."
@@ -908,7 +912,7 @@ def test(*args)
908
912
# TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
909
913
# The home needs to be set, otherwise TruffleFile does not allow access to files in the TruffleRuby home,
910
914
# 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 } "
912
916
mx 'unittest' , home , *tests
913
917
when 'tck' then mx 'tck' , *rest
914
918
else
@@ -1144,7 +1148,7 @@ def retag(*args)
1144
1148
1145
1149
# Test that running the post-install hook works, even when opt &
1146
1150
# 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" )
1148
1152
1149
1153
when 'gems'
1150
1154
# Test that we can compile and run some real C extensions
0 commit comments