Skip to content

Commit a5b92b8

Browse files
committed
test: add coverage for our "strip" wrappers
1 parent ec38f3b commit a5b92b8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/rcd_test/ext/mri/extconf.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,18 @@
9292
end
9393

9494
create_makefile("rcd_test/rcd_test_ext")
95+
96+
# exercise the strip command - this approach borrowed from grpc
97+
strip_tool = RbConfig::CONFIG['STRIP']
98+
strip_tool += ' -x' if RUBY_PLATFORM =~ /darwin/
99+
File.open('Makefile.new', 'w') do |o|
100+
o.puts 'hijack: all strip'
101+
o.puts
102+
o.write(File.read('Makefile'))
103+
o.puts
104+
o.puts 'strip: $(DLLIB)'
105+
o.puts "\t$(ECHO) Stripping $(DLLIB)"
106+
o.puts "\t$(Q) #{strip_tool} $(DLLIB)"
107+
end
108+
File.rename('Makefile.new', 'Makefile')
95109
end

0 commit comments

Comments
 (0)