Skip to content

Commit dfb3b85

Browse files
committed
JT: Do not try build if running specs with another Ruby
1 parent d6ec087 commit dfb3b85

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tool/jt.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,7 @@ def mspec(*args)
13181318
def test_specs(command, *args)
13191319
env_vars = {}
13201320
options = []
1321+
running_local_build = false
13211322

13221323
case command
13231324
when 'run'
@@ -1353,6 +1354,7 @@ def test_specs(command, *args)
13531354
options << '-t' << find_launcher(true)
13541355
options << '-T--native'
13551356
else
1357+
running_local_build = true
13561358
options += %w[-T--vm.ea -T--vm.esa -T--vm.Xmx2G]
13571359
options << "-T--core-load-path=#{TRUFFLERUBY_DIR}/src/main/ruby"
13581360
options << "-T--polyglot" # For Truffle::Interop.export specs
@@ -1384,8 +1386,9 @@ def test_specs(command, *args)
13841386
options += %w[--format specdoc]
13851387
end
13861388

1387-
if args.any? { |arg| arg.include? 'optional/capi' } or
1388-
args.include?(':capi') or args.include?(':truffle_capi') or args.include?(':library_cext')
1389+
if running_local_build && (
1390+
args.any? { |arg| arg.include? 'optional/capi' } ||
1391+
!(args & %w[:capi :truffle_capi :library_cext]).empty?)
13891392
build("cexts")
13901393
end
13911394

0 commit comments

Comments
 (0)