mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
9aa5fe1bf8
commit
a8d39a051c
2 changed files with 6 additions and 11 deletions
|
@ -855,7 +855,8 @@ make_pch(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile .c file to .so file. It returns true if it succeeds. (non-mswin)
|
// Compile .c file to .so file. It returns true if it succeeds. (non-mswin)
|
||||||
// Not compiling .c to .so directly because it fails on MinGW.
|
// Not compiling .c to .so directly because it fails on MinGW, and this helps
|
||||||
|
// to generate no .dSYM on macOS.
|
||||||
static bool
|
static bool
|
||||||
compile_c_to_so(const char *c_file, const char *so_file)
|
compile_c_to_so(const char *c_file, const char *so_file)
|
||||||
{
|
{
|
||||||
|
|
|
@ -720,7 +720,7 @@ class TestJIT < Test::Unit::TestCase
|
||||||
skip 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.'
|
skip 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.'
|
||||||
else
|
else
|
||||||
# verify .c files are deleted on unload_units
|
# verify .c files are deleted on unload_units
|
||||||
assert_send([Dir, :empty?, dir], debug_info) unless leave_dsym?
|
assert_send([Dir, :empty?, dir], debug_info)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -939,7 +939,7 @@ class TestJIT < Test::Unit::TestCase
|
||||||
Dir.mktmpdir("jit_test_clean_so_") do |dir|
|
Dir.mktmpdir("jit_test_clean_so_") do |dir|
|
||||||
code = "x = 0; 10.times {|i|x+=i}"
|
code = "x = 0; 10.times {|i|x+=i}"
|
||||||
eval_with_jit({"TMPDIR"=>dir}, code)
|
eval_with_jit({"TMPDIR"=>dir}, code)
|
||||||
assert_send([Dir, :empty?, dir]) unless leave_dsym?
|
assert_send([Dir, :empty?, dir])
|
||||||
eval_with_jit({"TMPDIR"=>dir}, code, save_temps: true)
|
eval_with_jit({"TMPDIR"=>dir}, code, save_temps: true)
|
||||||
assert_not_send([Dir, :empty?, dir])
|
assert_not_send([Dir, :empty?, dir])
|
||||||
end
|
end
|
||||||
|
@ -957,7 +957,7 @@ class TestJIT < Test::Unit::TestCase
|
||||||
exec "true"
|
exec "true"
|
||||||
end;
|
end;
|
||||||
error_message = "Undeleted files:\n #{Dir.glob("#{dir}/*").join("\n ")}\n"
|
error_message = "Undeleted files:\n #{Dir.glob("#{dir}/*").join("\n ")}\n"
|
||||||
assert_send([Dir, :empty?, dir], error_message) unless leave_dsym?
|
assert_send([Dir, :empty?, dir], error_message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1083,7 +1083,7 @@ class TestJIT < Test::Unit::TestCase
|
||||||
assert_equal("Successful MJIT finish\n" * 2, err.gsub(/^#{JIT_SUCCESS_PREFIX}:[^\n]+\n/, ''), debug_info)
|
assert_equal("Successful MJIT finish\n" * 2, err.gsub(/^#{JIT_SUCCESS_PREFIX}:[^\n]+\n/, ''), debug_info)
|
||||||
|
|
||||||
# ensure objects are deleted
|
# ensure objects are deleted
|
||||||
assert_send([Dir, :empty?, dir], debug_info) unless leave_dsym?
|
assert_send([Dir, :empty?, dir], debug_info)
|
||||||
end
|
end
|
||||||
end if defined?(fork)
|
end if defined?(fork)
|
||||||
|
|
||||||
|
@ -1178,10 +1178,4 @@ class TestJIT < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
insns
|
insns
|
||||||
end
|
end
|
||||||
|
|
||||||
# `clang -g` on macOS creates a .dSYM directory. As it's only created on --jit-debug,
|
|
||||||
# we're ignoring it for now. TODO: remove .dSYM file
|
|
||||||
def leave_dsym?
|
|
||||||
/darwin/ =~ RUBY_PLATFORM && @jit_debug
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue