summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-07-21 19:19:08 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-07-21 19:19:08 +0900
commit24712eeec39f5e9a11cfc2b940358403cda4f2b6 (patch)
tree1c73137b5a00c1ae13ee6d72256df4d23c2fd593 /test
parent523fec8a4baec1e2a9c1adc0095646b12aa6c76c (diff)
tool/test/runner.rb: support --test-target-dir option
tool/test/runner.rb had been copied from test/runner.rb. test/runner.rb was for `make test-all`, and tool/test/runner.rb was for `make test-testframework` and `make test-tool`. But I want to avoid the code clones. This change makes tool/test/runner.rb support --test-target-dir option which allows tool/test/runner.rb to run `make test-all`. Now we can remove test/runner.rb.
Diffstat (limited to 'test')
-rw-r--r--test/runner.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/test/runner.rb b/test/runner.rb
deleted file mode 100644
index db2084949e..0000000000
--- a/test/runner.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# frozen_string_literal: false
-require 'rbconfig'
-
-src_testdir = File.dirname(File.realpath(__FILE__))
-$LOAD_PATH << src_testdir
-tool_dir = File.join src_testdir, "..", "tool"
-$LOAD_PATH.unshift "#{tool_dir}/lib"
-
-# Get bundled gems on load path
-Dir.glob("#{src_testdir}/../gems/*/*.gemspec")
- .reject {|f| f =~ /minitest|test-unit|power_assert/ }
- .map {|f| $LOAD_PATH.unshift File.join(File.dirname(f), "lib") }
-
-require 'test/unit'
-
-module Gem
-end
-class Gem::TestCase < MiniTest::Unit::TestCase
- @@project_dir = File.dirname($LOAD_PATH.last)
-end
-
-ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
-
-require_relative "#{tool_dir}/lib/profile_test_all" if ENV.has_key?('RUBY_TEST_ALL_PROFILE')
-require_relative "#{tool_dir}/lib/tracepointchecker"
-require_relative "#{tool_dir}/lib/zombie_hunter"
-require_relative "#{tool_dir}/lib/iseq_loader_checker"
-
-if ENV['COVERAGE']
- require_relative "#{tool_dir}/test-coverage.rb"
-end
-
-begin
- exit Test::Unit::AutoRunner.run(true, src_testdir)
-rescue NoMemoryError
- system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
- system("ps x -opid,args,%cpu,%mem,nlwp,rss,vsz,wchan,stat,start,time,etime,blocked,caught,ignored,pending,f") if File.exist?("/bin/ps")
- raise
-end