# HG changeset patch # User jittat # Date 2008-03-23 09:12:41 # Node ID 7a9b64601b9d3fd8796003de20a503c5cfa8af40 # Parent 53204d348092c9f4c444686ba1cdc254daa033eb [grader] engine_spec: fix reg-ex new line problem, change test case for 1.5 sec submission (as the machine is a little faster) git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@150 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/test/data/test2_1-5sec.c b/test/data/test2_1-5sec.c --- a/test/data/test2_1-5sec.c +++ b/test/data/test2_1-5sec.c @@ -11,7 +11,7 @@ printf("%d\n",a+b); for(a=0; a<2; a++) { - while(c<1150000000) { + while(c<1550000000) { c++; b+=c; } diff --git a/test/engine_spec.rb b/test/engine_spec.rb --- a/test/engine_spec.rb +++ b/test/engine_spec.rb @@ -232,7 +232,7 @@ :graded_at= => nil, :compiler_message= => '', :grader_comment= => '', - :running_stat= => /[Ee]xit.*status.*10.*0.0 sec./, + :running_stat= => /[Ee]xit.*status.*10.*0\.0 sec/m, :output_file_name= => lambda { |fname| File.exists?(fname).should be_true }, diff --git a/test/engine_spec_helper.rb b/test/engine_spec_helper.rb --- a/test/engine_spec_helper.rb +++ b/test/engine_spec_helper.rb @@ -9,7 +9,7 @@ def init_sandbox config = Grader::Configuration.get_instance clear_sandbox - Dir.mkdir config.user_result_dir + FileUtils.mkdir_p config.user_result_dir cp_cmd = "cp -R #{config.test_data_dir}/ev #{config.test_sandbox_dir}" system(cp_cmd) end