# HG changeset patch # User Nattee Niparnan # Date 2014-08-10 16:46:20 # Node ID 8026f5b1cfcacaa7c83785576d3d3e42c05141a2 # Parent 96f7342390194d994bdcd91df3f6924ddf90befe fix logg() in compile, add more logging to engine.rb when the problem cannot be found diff --git a/lib/engine.rb b/lib/engine.rb --- a/lib/engine.rb +++ b/lib/engine.rb @@ -73,6 +73,8 @@ # puts "PROBLEM DIR: #{problem_home}" if !FileTest.exist?(problem_home) + puts "PROBLEM DIR: #{problem_home}" + puts "No test data. (check problem dir)" raise "No test data." end diff --git a/std-script/compile b/std-script/compile --- a/std-script/compile +++ b/std-script/compile @@ -11,14 +11,14 @@ # ############################## -def talk(msg) +def talk(str='') if ENV['TALKATIVE']!=nil puts str end if ENV['GRADER_LOGGING']!=nil log_fname = ENV['GRADER_LOGGING'] fp = File.open(log_fname,"a") - fp.puts("run: #{Time.new.strftime("%H:%M")} #{msg}") + fp.puts("run: #{Time.new.strftime("%H:%M")} #{str}") fp.close end end