Show More
Commit Description:
handle the case when problem id or submission id is null. Grader will simply skip such request. Add more report on console (for command line grading)...
Commit Description:
handle the case when problem id or submission id is null. Grader will simply skip such request. Add more report on console (for command line grading) (mercurial grafted from d233105d3965c5368c9b33125f390e39b25f910e)
File last commit:
Show/Diff file:
Action:
lib/import_helper.rb | 28 lines | 670 B | text/x-ruby | RubyLexer |
def filter_filename_for_testrun(testrun, filename_list, raw_prefix='')
l = []
regex = Regexp.new("^(#{Regexp.escape(raw_prefix)}#{testrun}[a-z]*|#{testrun}-.*)$")
filename_list.each do |filename|
if regex.match(filename)
l << filename
end
end
l
end
def build_testrun_info(num_testruns, input_filename_list, raw_prefix='')
info = []
num_testcases = 0
num_testruns.times do |i|
r = i+1
testrun_info = []
filenames = filter_filename_for_testrun(r,input_filename_list,raw_prefix)
filenames.each do |fname|
num_testcases += 1
testrun_info << [num_testcases,fname]
end
info << testrun_info
end
info
end