ruby-changes:50632
From: k0kubun <ko1@a...>
Date: Sat, 17 Mar 2018 15:33:34 +0900 (JST)
Subject: [ruby-changes:50632] k0kubun:r62792 (trunk): test_jit.rb: debug cc1 availability
k0kubun 2018-03-17 15:33:28 +0900 (Sat, 17 Mar 2018) New Revision: 62792 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62792 Log: test_jit.rb: debug cc1 availability ENV didn't have any useful information. Modified files: trunk/test/ruby/test_jit.rb Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 62791) +++ test/ruby/test_jit.rb (revision 62792) @@ -547,9 +547,16 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L547 actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size # Debugging on CI - if err.include?("gcc: error trying to exec 'cc1': execvp: No such file or directory") - $stderr.puts "test/ruby/test_jit.rb: ENV content:" - PP.pp(ENV, $stderr) + if err.include?("gcc: error trying to exec 'cc1': execvp: No such file or directory") && RbConfig::CONFIG['CC'] == 'gcc' + $stderr.puts "\ntest/ruby/test_jit.rb: DEBUG OUTPUT:" + cc1 = %x`gcc -print-prog-name=cc1`.rstrip + if $?.success? + $stderr.puts "cc1 path: #{cc1}" + $stderr.puts "executable?: #{File.executable?(cc1)}" + $stderr.puts "ls:\n#{IO.popen(['ls', '-la', File.dirname(cc1)], &:read)}" + else + $stderr.puts 'Failed to fetch cc1 path' + end end assert_equal( -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/