diff --git a/lib/kgrader/backend/svn.rb b/lib/kgrader/backend/svn.rb index 1928a5e..465db70 100644 --- a/lib/kgrader/backend/svn.rb +++ b/lib/kgrader/backend/svn.rb @@ -14,15 +14,10 @@ module KGrader::Backend def prepare(semester, assignment) 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: " @password = STDIN.noecho(&:gets).chomp + print "svn: bad password or other network issues" unless test_okay end end @@ -75,5 +70,14 @@ module KGrader::Backend :student => student } 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 diff --git a/lib/kgrader/jail.rb b/lib/kgrader/jail.rb index 1a0cc8d..ac8a803 100644 --- a/lib/kgrader/jail.rb +++ b/lib/kgrader/jail.rb @@ -52,7 +52,7 @@ module KGrader Dir.chdir @root options = { :in => :close, :out => fp, :err => fp, :close_others => true, - :rlimit_nproc => 32 + :rlimit_nproc => 64 } yield options if block_given? Process.exec *command, options diff --git a/lib/kgrader/runtime.rb b/lib/kgrader/runtime.rb index 4141b92..1bdd479 100644 --- a/lib/kgrader/runtime.rb +++ b/lib/kgrader/runtime.rb @@ -15,7 +15,6 @@ module KGrader grade 0 end - puts "no grade received?" comment "autograde error (no grade reported); please contact staff" grade 0 end @@ -27,6 +26,7 @@ module KGrader end def comment(text) + puts "comment: #{text}" IO.new(4).write text + "\n" end diff --git a/spec/cs241h b/spec/cs241h index 22fd6cb..840fb08 160000 --- a/spec/cs241h +++ b/spec/cs241h @@ -1 +1 @@ -Subproject commit 22fd6cb688fcce712b4b68235533b59753aeaed7 +Subproject commit 840fb087ef3a9644a4f1ebb01a6baf555a7aa496