@@ -14,15 +14,10 @@ module KGrader::Backend | |||||
def prepare(semester, assignment) | def prepare(semester, assignment) | ||||
return unless @config['verify'] | return unless @config['verify'] | ||||
url = @config['verify'] % { | |||||
:semester => semester, | |||||
:assignment => assignment | |||||
} | |||||
status = run('list', '--non-interactive', url)[1] | |||||
if status.exited? && status.exitstatus != 0 | |||||
unless test_okay | |||||
print "svn: password: " | print "svn: password: " | ||||
@password = STDIN.noecho(&:gets).chomp | @password = STDIN.noecho(&:gets).chomp | ||||
print "svn: bad password or other network issues" unless test_okay | |||||
end | end | ||||
end | end | ||||
@@ -75,5 +70,14 @@ module KGrader::Backend | |||||
:student => student | :student => student | ||||
} | } | ||||
end | end | ||||
def test_okay | |||||
url = @config['verify'] % { | |||||
:semester => semester, | |||||
:assignment => assignment | |||||
} | |||||
status = run('list', '--non-interactive', url)[1] | |||||
status.exited? && status.exitstatus == 0 | |||||
end | |||||
end | end | ||||
end | end |
@@ -52,7 +52,7 @@ module KGrader | |||||
Dir.chdir @root | Dir.chdir @root | ||||
options = { | options = { | ||||
:in => :close, :out => fp, :err => fp, :close_others => true, | :in => :close, :out => fp, :err => fp, :close_others => true, | ||||
:rlimit_nproc => 32 | |||||
:rlimit_nproc => 64 | |||||
} | } | ||||
yield options if block_given? | yield options if block_given? | ||||
Process.exec *command, options | Process.exec *command, options | ||||
@@ -15,7 +15,6 @@ module KGrader | |||||
grade 0 | grade 0 | ||||
end | end | ||||
puts "no grade received?" | |||||
comment "autograde error (no grade reported); please contact staff" | comment "autograde error (no grade reported); please contact staff" | ||||
grade 0 | grade 0 | ||||
end | end | ||||
@@ -27,6 +26,7 @@ module KGrader | |||||
end | end | ||||
def comment(text) | def comment(text) | ||||
puts "comment: #{text}" | |||||
IO.new(4).write text + "\n" | IO.new(4).write text + "\n" | ||||
end | end | ||||
@@ -1 +1 @@ | |||||
Subproject commit 22fd6cb688fcce712b4b68235533b59753aeaed7 | |||||
Subproject commit 840fb087ef3a9644a4f1ebb01a6baf555a7aa496 |