Skip to content

Commit

Permalink
Align patches
Browse files Browse the repository at this point in the history
  • Loading branch information
MSP-Greg committed Apr 16, 2021
1 parent ca05458 commit 6408ae3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
20 changes: 10 additions & 10 deletions patches_test/_install_rubygems.patch
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Patch by MSP-Greg
Allows running Core RubyGems tests from installed Ruby
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index aef00cd761..2199f853c0 100644
diff --git a/test/rubygems/test_gem.rb b/tediff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 8b028d3495..9f7d76c798 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -947,7 +947,7 @@ def test_self_platforms
@@ -1030,7 +1030,7 @@ def test_self_platforms
end

def test_self_prefix
- assert_equal PROJECT_DIR, Gem.prefix
+ assert_nil Gem.prefix
end

def test_self_prefix_libdir
diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb
index 12ec8dd6b2..27b07db01b 100644
index a3edeb69bd..7f04924e6e 100644
--- a/test/rubygems/test_gem_commands_environment_command.rb
+++ b/test/rubygems/test_gem_commands_environment_command.rb
@@ -25,7 +25,11 @@ def test_execute
Expand All @@ -31,13 +31,13 @@ index 12ec8dd6b2..27b07db01b 100644
@ui.output
assert_match %r{GIT EXECUTABLE: #{@cmd.send(:git_path)}}, @ui.output
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 749e9bee20..c41dc1e95c 100644
index 9b590f0022..0a02663f7f 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -612,8 +612,11 @@ def test_update_rubygems_arguments

@@ -639,8 +639,11 @@ def test_update_rubygems_arguments
arguments = @cmd.update_rubygems_arguments

- assert_equal '--prefix', arguments.shift
- assert_equal Gem.prefix, arguments.shift
+ # asserts fail from install folder
Expand Down
6 changes: 3 additions & 3 deletions patches_test/ruby-test_file_exhaustive.rb.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# extend timeout to pass Windows parallel CI
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 0cb63c8f05..fde6e8d6ec 100644
index 0ccf99312b..d4ebddbf23 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -1391,7 +1391,8 @@ def test_flock_exclusive
@@ -1396,7 +1396,8 @@ def test_flock_exclusive
assert_separately(["-rtimeout", "-", regular_file], "#{<<~begin}#{<<~"end;"}")
begin
open(ARGV[0], "r") do |f|
Expand All @@ -13,7 +13,7 @@ index 0cb63c8f05..fde6e8d6ec 100644
assert(!f.flock(File::LOCK_SH|File::LOCK_NB))
end
end
@@ -1400,7 +1401,8 @@ def test_flock_exclusive
@@ -1405,7 +1406,8 @@ def test_flock_exclusive
begin
open(ARGV[0], "r") do |f|
assert_raise(Timeout::Error) do
Expand Down
12 changes: 3 additions & 9 deletions patches_test/runner.rb.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
diff --git a/test/runner.rb b/test/runner.rb
index 3e2e1316b1..efa6a8f428 100644
index d23d9f0bd2..3f84dea67f 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -1,11 +1,22 @@
# frozen_string_literal: true

+require 'rbconfig'
+
# Should be done in rubygems test files?
@@ -4,9 +4,16 @@
ENV["GEM_SKIP"] = ENV["GEM_HOME"] = ENV["GEM_PATH"] = "".freeze
ENV.delete("RUBY_CODESIGN")

-# Get bundled gems on load path
-Dir.glob("#{__dir__}/../gems/*/*.gemspec")
Expand All @@ -24,7 +20,5 @@ index 3e2e1316b1..efa6a8f428 100644
.reject {|f| f =~ /minitest|test-unit|power_assert/ }
- .map {|f| $LOAD_PATH.unshift File.join(File.dirname(f), "lib") }
+ .each {|f| $LOAD_PATH.unshift f[0..-2] }
+
+puts '', gem_dir, '', $LOAD_PATH, ''

require_relative '../tool/test/runner'

0 comments on commit 6408ae3

Please sign in to comment.