[前][次][番号順一覧][スレッド一覧]

ruby-changes:61001

From: Takashi <ko1@a...>
Date: Mon, 4 May 2020 08:50:17 +0900 (JST)
Subject: [ruby-changes:61001] a8d39a051c (master): Test no .dSYM on macOS

https://git.ruby-lang.org/ruby.git/commit/?id=a8d39a051c

From a8d39a051c3489a04c8088f7fefac56f0e5b7fef Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sun, 3 May 2020 16:49:30 -0700
Subject: Test no .dSYM on macOS

I think 9aa5fe1bf89db8cd215b24d8ddfb668714681b83 helps this issue too.

diff --git a/mjit_worker.c b/mjit_worker.c
index 49903f2..63f0d64 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -855,7 +855,8 @@ make_pch(void) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L855
 }
 
 // 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
 compile_c_to_so(const char *c_file, const char *so_file)
 {
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 63579f2..a5d5fb4 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -720,7 +720,7 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L720
         skip 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.'
       else
         # 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
@@ -939,7 +939,7 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L939
     Dir.mktmpdir("jit_test_clean_so_") do |dir|
       code = "x = 0; 10.times {|i|x+=i}"
       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)
       assert_not_send([Dir, :empty?, dir])
     end
@@ -957,7 +957,7 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L957
         exec "true"
       end;
       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
 
@@ -1083,7 +1083,7 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L1083
       assert_equal("Successful MJIT finish\n" * 2, err.gsub(/^#{JIT_SUCCESS_PREFIX}:[^\n]+\n/, ''), debug_info)
 
       # ensure objects are deleted
-      assert_send([Dir, :empty?, dir], debug_info) unless leave_dsym?
+      assert_send([Dir, :empty?, dir], debug_info)
     end
   end if defined?(fork)
 
@@ -1178,10 +1178,4 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L1178
     end
     insns
   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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]