lib/slather/command/coverage_command.rb in slather-2.1.0 vs lib/slather/command/coverage_command.rb in slather-2.2.0
- old
+ new
@@ -22,12 +22,13 @@
option ["--verbose", "-v"], :flag, "Enable verbose mode"
option ["--input-format"], "INPUT_FORMAT", "Input format (gcov, profdata)"
option ["--scheme"], "SCHEME", "The scheme for which the coverage was generated"
option ["--workspace"], "WORKSPACE", "The workspace that the project was built in"
- option ["--binary-file"], "BINARY_FILE", "The binary file against the which the coverage will be run"
- option ["--binary-basename"], "BINARY_BASENAME", "Basename of the file against which the coverage will be run"
+ option ["--binary-file"], "BINARY_FILE", "The binary file against the which the coverage will be run", :multivalued => true
+ option ["--binary-basename"], "BINARY_BASENAME", "Basename of the file against which the coverage will be run", :multivalued => true
+ option ["--source-files"], "SOURCE_FILES", "A Dir.glob compatible pattern used to limit the lookup to specific source files. Ignored in gcov mode.", :multivalued => true
def execute
puts "Slathering..."
setup_service_name
@@ -40,10 +41,11 @@
setup_input_format
setup_scheme
setup_workspace
setup_binary_file
setup_binary_basename
+ setup_source_files
project.configure
post
@@ -125,12 +127,16 @@
def setup_workspace
project.workspace = workspace
end
def setup_binary_file
- project.binary_file = binary_file
+ project.binary_file = binary_file_list if !binary_file_list.empty?
end
def setup_binary_basename
- project.binary_basename = binary_basename
+ project.binary_basename = binary_basename_list if !binary_basename_list.empty?
+ end
+
+ def setup_source_files
+ project.source_files = source_files_list if !source_files_list.empty?
end
end