summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-17 06:33:28 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-17 06:33:28 +0000
commit4b3809114b4cce85280d6698f818c037967e1662 (patch)
tree82234d0e25d918cee4e6e4a467f48820743f31ed /test
parent86a16b36ae7d6149080588cbd196371888fb48f4 (diff)
test_jit.rb: debug cc1 availability
ENV didn't have any useful information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_jit.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index c973a3ef5a..9e929213ad 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -547,9 +547,16 @@ class TestJIT < Test::Unit::TestCase
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(