Project

General

Profile

Actions

Bug #13441

closed

building - GIT variable, ruby, rubygems tests

Added by MSP-Greg (Greg L) about 7 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-04-15 trunk 58363) [x64-mingw32]
[ruby-core:80697]

Description

As I've mentioned before, I've been building and using MinGW trunk builds for several months. I've needed a few patches to stop segv issues, but recent builds have had approx ten combined failures and errors.

I've never had issues with test and test-rubyspec, so I only run test-all. I also set --show-skip.

RubyGems uses git in its testing, and can read an environment variable for its location. I assume many windows users have a git install from https://git-scm.com/ (not the GitHub UI) installed, which defaults to an install location with a space in the path. Also, the MinGW / msys2 build environment does not reliably read the native PATH variable (could be a spaces issue).

The RubyGems tests allow one to set a GIT environment variable for the location of the git executable. I added a 'non-space' symlink to git in my build system, and added it as an environment variable. Without it, several of the RubyGems tests skip with the following message -

cannot find git executable, use GIT environment variable to set

I haven't looked thru all the code, but it appears there have been several recent commits that may address refereshing the ruby / spec repo. These seem to conflict with the RubyGems tests use of the variable.

FYI, a while ago I patched test/runner.rb to output the evironment variables before the tests run. Before these commits, ENV['GIT'] was showing the git command file correctly. After them, it's set to the string git.

Is there any way to work around this issue?

Ruby, Rails, etc Docs

Updated by MSP-Greg (Greg L) about 7 years ago

These changes cause 37 RubyGems tests to be skipped.

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Open to Feedback

Try --with-git=git.exe configuration option.

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

I think rather Gem::TestCase#in_path? should consider RbConfig::CONFIG['EXECUTABLE_EXTS'], or RbConfig::CONFIG['EXEEXT'] at least.

Updated by MSP-Greg (Greg L) about 7 years ago

nobu (Nobuyoshi Nakada) wrote:

Try --with-git=git.exe configuration option.

Thanks. I'll try, just started a build testing the io.c patch.

Should that be git.exe or a full path to the file?

Updated by MSP-Greg (Greg L) about 7 years ago

nobu,

Thank you for the info. A hardcoded string (full path) worked with the RubyGems tests. Now, I need to try the environment variable in PKGBUILD, which is one of several set before the build starts (many are info about the current version in the local repo files). Passes quite a few things back and forth before getting to config and make.

Roughly, cmd => .rb => cmd => config/make

As an aside, I've mostly been building 64 bit trunk, but I recently tried 2.3 stable, and it built with similar results to trunk. Some issues though, one being a need to swap from OpenSSL 1.1.0f to 1.0.2k...

Updated by MSP-Greg (Greg L) about 7 years ago

As long as we're discussing git and the build system, do you believe the following would help (or not break) builds on *nix systems?

place after line 7 of tools/vcs.rb

if (t = ENV['GIT']) && File.exist?(t)
  ENV['PATH'] = "#{File.dirname(t)}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
end

Allows the build system to create revision.h, etc.

Actions #7

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0