Skip to content

Commit d9f6509

Browse files
committed
[GR-16795] Always call make for FFI specs.
PullRequest: truffleruby/942
2 parents 5ae9bcc + 1da6d82 commit d9f6509

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

spec/ffi/fixtures/compile.rb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,12 @@ module TestLibrary
4848
def self.compile_library(path, lib)
4949
dir = File.expand_path(path, File.dirname(__FILE__))
5050
lib = "#{dir}/#{lib}"
51-
unless File.exist?(lib)
52-
output = nil
53-
FileUtils.cd(dir) do
54-
make = system('which gmake >/dev/null') ? 'gmake' : 'make'
55-
output = system(*%{#{make} CPU=#{CPU} OS=#{OS}}.tap{|x| puts x.inspect})
56-
end
5751

58-
unless $?.success?
59-
puts "ERROR:\n#{output}"
52+
FileUtils.cd(dir) do
53+
make = system('which gmake >/dev/null') ? 'gmake' : 'make'
54+
55+
unless system(*%{#{make} CPU=#{CPU} OS=#{OS}}.tap{ |cmd| puts cmd.inspect })
56+
puts "ERROR: #{$?}"
6057
raise "Unable to compile #{lib.inspect}"
6158
end
6259
end

0 commit comments

Comments
 (0)