Separated tool/test/runner.rb and test/runner.rb

As `make test-tool` does not use gems, and no Rubygems stuffs is
needed, so moved such things to test/runner.rb.  Also no longer
nees `--test-target-dir` option.
This commit is contained in:
Nobuyoshi Nakada 2019-07-24 11:07:15 +09:00
parent 46771abfe5
commit 8e53d18e67
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
4 changed files with 32 additions and 37 deletions

11
test/runner.rb Normal file
View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
# Should be done in rubygems test files?
ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
# Get bundled gems on load path
Dir.glob("#{__dir__}/../gems/*/*.gemspec")
.reject {|f| f =~ /minitest|test-unit|power_assert/ }
.map {|f| $LOAD_PATH.unshift File.join(File.dirname(f), "lib") }
require_relative '../tool/test/runner'