Skip to content

Commit 82a3526

Browse files
committed
[GR-14565] Add JVM in the VM string like in AbstractLanguageLauncher#printVersion() and fix JS backtraces test
PullRequest: truffleruby/742
2 parents 9430616 + 8eb47c0 commit 82a3526

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

spec/truffle/identity_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
guard -> { !TruffleRuby.native? } do
4141
it "RUBY_DESCRIPTION indicates which VM TruffleRuby runs on and which edition" do
42-
RUBY_DESCRIPTION.should =~ /\b(Interpreted|GraalVM CE|GraalVM EE)\b/
42+
RUBY_DESCRIPTION.should =~ /\b(Interpreted JVM|GraalVM CE JVM|GraalVM EE JVM)\b/
4343
RUBY_DESCRIPTION.should_not include("Native")
4444
RUBY_DESCRIPTION.should_not include("native")
4545
end

src/shared/java/org/truffleruby/shared/TruffleRuby.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static String getVersionString(String implementationName, boolean isAOT)
3030
if (isAOT) {
3131
vm = implementationName + " Native";
3232
} else {
33-
vm = implementationName;
33+
vm = implementationName + " JVM";
3434
}
3535

3636
return String.format(

test/truffle/integration/backtraces.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ source test/truffle/common.sh.inc
55
for f in test/truffle/integration/backtraces/*.rb
66
do
77
echo "$f"
8-
options=""
9-
if [ "$(basename "$f")" = "javascript.rb" ]; then
10-
options="--polyglot --experimental-options --single_threaded"
8+
if [ "$(basename "$f")" != "javascript.rb" ]; then
9+
jt ruby --no-core-load-path "$f"
1110
fi
12-
jt ruby --no-core-load-path $options "$f"
1311
done
12+
13+
if [ "$(jt ruby -e 'p TruffleRuby.native?')" = "false" ]; then
14+
jt ruby --no-core-load-path --polyglot --experimental-options --single_threaded test/truffle/integration/backtraces/javascript.rb
15+
fi

0 commit comments

Comments
 (0)