Skip to content

Commit ba52a0e

Browse files
committed
Make jt -u ruby test mri work
1 parent 5374af6 commit ba52a0e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

test/mri/tests/lib/minitest/unit.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
require "optparse"
55
require "rbconfig"
6-
require "leakchecker" unless defined?(::TruffleRuby)
6+
# require "leakchecker" # TruffleRuby: LeakChecker removed to avoid interferences
77

88
##
99
# Minimal (mostly drop-in) replacement for test-unit.
@@ -939,7 +939,7 @@ def _run_suite suite, type
939939
filter === m || filter === "#{suite}##{m}"
940940
}
941941

942-
leakchecker = LeakChecker.new unless defined?(::TruffleRuby)
942+
# leakchecker = LeakChecker.new # TruffleRuby: LeakChecker removed to avoid interferences
943943

944944
continuation = proc do
945945
assertions = filtered_test_methods.map { |method|
@@ -957,7 +957,7 @@ def _run_suite suite, type
957957
$stdout.flush
958958

959959
unless defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # compiler process is wrongly considered as leak
960-
leakchecker.check("#{inst.class}\##{inst.__name__}") unless defined?(::TruffleRuby)
960+
# leakchecker.check("#{inst.class}\##{inst.__name__}") # TruffleRuby: LeakChecker removed to avoid interferences
961961
end
962962

963963
inst._assertions

test/mri/tests/runner.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# frozen_string_literal: true
22
require 'rbconfig'
33

4-
if defined?(::TruffleRuby)
5-
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
6-
else
7-
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
8-
end
4+
# TruffleRuby: adapt test lib path
5+
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
6+
# $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
97

108
require 'test/unit'
119

0 commit comments

Comments
 (0)