浏览代码

Merge pull request #15021 from apolcyn/fix_gcov_ruby

Fix a broken gcov test
apolcyn 7 年之前
父节点
当前提交
2fe68c8ad3
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      src/ruby/spec/pb/package_with_underscore/checker_spec.rb

+ 2 - 5
src/ruby/spec/pb/package_with_underscore/checker_spec.rb

@@ -15,16 +15,13 @@
 require 'open3'
 require 'open3'
 require 'tmpdir'
 require 'tmpdir'
 
 
-def debug_mode?
-  !ENV['CONFIG'].nil? && ENV['CONFIG'] == 'dbg'
-end
-
 describe 'Package with underscore protobuf code generation' do
 describe 'Package with underscore protobuf code generation' do
   it 'should have the same content as created by code generation' do
   it 'should have the same content as created by code generation' do
     root_dir = File.join(File.dirname(__FILE__), '..', '..', '..', '..', '..')
     root_dir = File.join(File.dirname(__FILE__), '..', '..', '..', '..', '..')
     pb_dir = File.join(root_dir, 'src', 'ruby', 'spec', 'pb')
     pb_dir = File.join(root_dir, 'src', 'ruby', 'spec', 'pb')
 
 
-    bins_sub_dir = debug_mode? ? 'dbg' : 'opt'
+    fail 'CONFIG env variable unexpectedly unset' unless ENV['CONFIG']
+    bins_sub_dir = ENV['CONFIG']
     bins_dir = File.join(root_dir, 'bins', bins_sub_dir)
     bins_dir = File.join(root_dir, 'bins', bins_sub_dir)
 
 
     plugin = File.join(bins_dir, 'grpc_ruby_plugin')
     plugin = File.join(bins_dir, 'grpc_ruby_plugin')