Show More
Commit Description:
removed calls to 'pwd', other uses of back quotes
Commit Description:
removed calls to 'pwd', other uses of back quotes
References:
File last commit:
Show/Diff file:
Action:
lib/import_helper.rb
| 28 lines
| 670 B
| text/x-ruby
| RubyLexer
|
|
r63 | |||
|
r72 | def filter_filename_for_testrun(testrun, filename_list, raw_prefix='') | ||
|
r63 | l = [] | ||
|
r72 | regex = Regexp.new("^(#{Regexp.escape(raw_prefix)}#{testrun}[a-z]*|#{testrun}-.*)$") | ||
|
r63 | filename_list.each do |filename| | ||
if regex.match(filename) | ||||
l << filename | ||||
end | ||||
end | ||||
l | ||||
end | ||||
|
r72 | def build_testrun_info(num_testruns, input_filename_list, raw_prefix='') | ||
|
r63 | info = [] | ||
num_testcases = 0 | ||||
num_testruns.times do |i| | ||||
r = i+1 | ||||
testrun_info = [] | ||||
|
r72 | filenames = filter_filename_for_testrun(r,input_filename_list,raw_prefix) | ||
|
r63 | filenames.each do |fname| | ||
num_testcases += 1 | ||||
testrun_info << [num_testcases,fname] | ||||
end | ||||
info << testrun_info | ||||
end | ||||
info | ||||
end | ||||