Show More
Commit Description:
add a new modified sandbox "box"...
Commit Description:
add a new modified sandbox "box"
The original file was pulled from moe (git://git.ucw.cz/moe.git)
by Martin Mares's commit on Sun Jul 29 23:53:56 2012 +0200
The modification is to make it separately compilable and add more option
to specify additional argument to the program. (Please see usage guide)
run `gcc -o box -std=c99 box64-new.c` to compile.
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 | ||||