Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore default_path test cases for Ruby with custom configuration #7187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 22, 2023

  1. Ignore default_path test cases for Ruby with custom configuration

    RubyGems provides means to override their defaults, such as
    `Gem.default_path` method. With such modified configuration, the
    following errors might be observed:
    
    ~~~
        1) Failure:
      TestGem#test_default_path_vendor_dir [/home/runner/work/ruby/ruby/src/test/rubygems/test_gem.rb:612]:
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-qs43ch/gemhome",
       "/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-qs43ch/vendor/gems/3.3.0+0"]> expected but was
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-qs43ch/gemhome",
       "/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-qs43ch/vendor/gems/3.3.0+0",
       "/usr/local/lib/ruby/bundled_gems/3.3.0+0",
       "/usr/local/lib/ruby/default_gems/3.3.0+0"]>.
      make: *** [uncommon.mk:943: yes-test-all] Error 4
    
        2) Failure:
      TestGem#test_default_path_missing_vendor [/home/runner/work/ruby/ruby/src/test/rubygems/test_gem.rb:592]:
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-c41yb7/gemhome"]> expected but was
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-c41yb7/gemhome",
       "/usr/local/lib/ruby/bundled_gems/3.3.0+0",
       "/usr/local/lib/ruby/default_gems/3.3.0+0"]>.
    
        3) Failure:
      TestGem#test_default_path_user_home [/home/runner/work/ruby/ruby/src/test/rubygems/test_gem.rb:600]:
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-5mm6uc/userhome/.local/share/gem/ruby/3.3.0+0",
       "/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-5mm6uc/gemhome"]> expected but was
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-5mm6uc/userhome/.local/share/gem/ruby/3.3.0+0",
       "/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-5mm6uc/gemhome",
       "/usr/local/lib/ruby/bundled_gems/3.3.0+0",
       "/usr/local/lib/ruby/default_gems/3.3.0+0"]>.
    
        4) Failure:
      TestGem#test_default_path [/home/runner/work/ruby/ruby/src/test/rubygems/test_gem.rb:582]:
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-kan9o5/gemhome"]> expected but was
      <["/home/runner/work/ruby/ruby/build/tmp/test_rubygems_20231110-59661-kan9o5/gemhome",
       "/usr/local/lib/ruby/bundled_gems/3.3.0+0",
       "/usr/local/lib/ruby/default_gems/3.3.0+0"]>.
    ~~~
    
    Of course the `Gem.default_path` could be stubbed, but testing stub
    should not be the point.
    
    Therefore, just detect if `Gem.default_path` was customized and ignore
    the test cases.
    voxik committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    7b4b1cd View commit details
    Browse the repository at this point in the history