Description:
fixed: grader crashes when the problem has no test data
git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@431 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r83:285efa98811f - - 1 file changed: 5 inserted, 1 deleted
@@ -65,6 +65,10 | |||
|
65 | 65 | # puts "GRADING DIR: #{grading_dir}" |
|
66 | 66 | # puts "PROBLEM DIR: #{problem_home}" |
|
67 | 67 | |
|
68 | + if !FileTest.exist?(problem_home) | |
|
69 | + raise "No test data." | |
|
70 | + end | |
|
71 | + | |
|
68 | 72 | dinit = DirInit::Manager.new(problem_home) |
|
69 | 73 | |
|
70 | 74 | dinit.setup do |
@@ -83,7 +87,7 | |||
|
83 | 87 | end |
|
84 | 88 | |
|
85 | 89 | rescue RuntimeError => msg |
|
86 |
- @reporter.report_error(submission, |
|
|
90 | + @reporter.report_error(submission, msg) | |
|
87 | 91 | |
|
88 | 92 | ensure |
|
89 | 93 | @room_maker.clean_up(submission) |
You need to be logged in to leave comments.
Login now