Skip to content

Commit 854b954

Browse files
committed
Create JVM standalones by default for jvm* env files and only build GraalVM + standalone
* Except for `jt test unit` and `jt test tck` which need a full `mx build` before.
1 parent 168108e commit 854b954

File tree

10 files changed

+31
-3
lines changed

10 files changed

+31
-3
lines changed

ci.jsonnet

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ local part_definitions = {
302302

303303
run: {
304304
test_unit_tck: {
305-
run+: jt(["test", "unit", "--verbose"]) +
305+
run+: jt(["mx", "build"]) +
306+
jt(["test", "unit", "--verbose"]) +
306307
jt(["test", "tck"])
307308
},
308309

mx.truffleruby/jvm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools
33
COMPONENTS=TruffleRuby,suite:tools
4+
# To also create the standalone
5+
INSTALLABLES=TruffleRuby
6+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ce

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler
4+
# To also create the standalone
5+
INSTALLABLES=TruffleRuby
6+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ce-libgraal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,LibGraal
44
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
5+
# To also create the standalone
6+
INSTALLABLES=TruffleRuby
7+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ce-ntl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM
44
NATIVE_IMAGES=suite:sulong
5+
# To also create the standalone
6+
INSTALLABLES=TruffleRuby
7+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise
4+
# To also create the standalone
5+
INSTALLABLES=TruffleRuby
6+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ee-libgraal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,LibGraal Enterprise
44
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
5+
# To also create the standalone
6+
INSTALLABLES=TruffleRuby
7+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/jvm-ee-ntl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
22
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
33
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise
44
NATIVE_IMAGES=suite:sulong
5+
# To also create the standalone
6+
INSTALLABLES=TruffleRuby
7+
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES

mx.truffleruby/mx_truffleruby.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ def build_truffleruby(args):
143143

144144
def ruby_check_heap_dump(input_args, out=None):
145145
print("mx ruby_check_heap_dump " + " ".join(input_args))
146+
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST']
147+
mx.command_function('build')(['--dependencies', ','.join(dists)])
146148
args = input_args
147149
args.insert(0, "--experimental-options")
148-
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST']
149150
vm_args, truffleruby_args = mx.extract_VM_args(args, useDoubleDash=True, defaultAllVMArgs=False)
150151
vm_args += mx.get_runtime_jvm_args(dists)
151152
# vm_args.append("-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y")

tool/jt.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ def test(*args)
11651165
require_ruby_launcher!
11661166
path, *rest = args
11671167

1168+
if %w[unit unittest tck].include?(path)
1169+
puts bold "NOTE: You need `jt mx build` before running `jt test #{path}` to build the relevant test distributions"
1170+
end
1171+
11681172
case path
11691173
when nil
11701174
%w[specs mri bundle cexts integration gems ecosystem compiler].each do |kind|
@@ -1187,7 +1191,8 @@ def test(*args)
11871191
tests = tests.empty? ? ['org.truffleruby'] : tests
11881192
# TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
11891193
mx(*mx_options, 'unittest', *unittest_options, *tests)
1190-
when 'tck' then mx 'tck', *rest
1194+
when 'tck'
1195+
mx 'tck', *rest
11911196
else
11921197
if File.expand_path(path, TRUFFLERUBY_DIR).start_with?("#{TRUFFLERUBY_DIR}/test")
11931198
test_mri(*args)

0 commit comments

Comments
 (0)