From 5f2987d6c2ae9ace3178ac3e1bbb4ac7079101eb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 4 Aug 2021 17:38:46 +0900 Subject: [PATCH] Fix relative paths from core_assertions.rb --- tool/lib/core_assertions.rb | 6 +++--- tool/test/testunit/test_parallel.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index eb064123bd..43ced2f2f1 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -117,7 +117,7 @@ module Test # TODO: consider choosing some appropriate limit for MJIT and stop skipping this once it does not randomly fail pend 'assert_no_memory_leak may consider MJIT memory usage as leak' if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? - require_relative '../../memory_status' + require_relative 'memory_status' raise MiniTest::Skip, "unsupported platform" unless defined?(Memory::Status) token = "\e[7;1m#{$$.to_s}:#{Time.now.strftime('%s.%L')}:#{rand(0x10000).to_s(16)}:\e[m" @@ -126,7 +126,7 @@ module Test envs = args.shift if Array === args and Hash === args.first args = [ "--disable=gems", - "-r", File.expand_path("../../../memory_status", __FILE__), + "-r", File.expand_path("../memory_status", __FILE__), *args, "-v", "-", ] @@ -478,7 +478,7 @@ eom ex end - MINI_DIR = File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), "minitest") #:nodoc: + MINI_DIR = File.join(File.dirname(File.expand_path(__FILE__)), "minitest") #:nodoc: # :call-seq: # assert(test, [failure_message]) diff --git a/tool/test/testunit/test_parallel.rb b/tool/test/testunit/test_parallel.rb index fa87ca53ab..c3c643fab3 100644 --- a/tool/test/testunit/test_parallel.rb +++ b/tool/test/testunit/test_parallel.rb @@ -113,7 +113,7 @@ module TestParallel result = Marshal.load($1.chomp.unpack("m")[0]) assert_equal(5, result[0]) - assert_equal(17, result[1]) + assert_equal(12, result[1]) assert_kind_of(Array,result[2]) assert_kind_of(Array,result[3]) assert_kind_of(Array,result[4])