Description:
adjust time limit, double for ruby,python,php
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r166:bea407bc1073 - - 1 file changed: 3 inserted, 3 deleted
@@ -97,29 +97,29 | |||||
|
97 |
|
97 | ||
|
98 | case language |
|
98 | case language |
|
99 | when "java" |
|
99 | when "java" |
|
100 | # for java, extract the classname |
|
100 | # for java, extract the classname |
|
101 | # wne have to add additional systemcall and we don't check the mem limit (dunno how to fix...) |
|
101 | # wne have to add additional systemcall and we don't check the mem limit (dunno how to fix...) |
|
102 | classname = 'DUMMY' |
|
102 | classname = 'DUMMY' |
|
103 | File.open(program_name,"r").each do |line| |
|
103 | File.open(program_name,"r").each do |line| |
|
104 | classname = line |
|
104 | classname = line |
|
105 | end |
|
105 | end |
|
106 | #for java, we cannot really check the memory limit... |
|
106 | #for java, we cannot really check the memory limit... |
|
107 | run_command = "#{problem_home}/script/box -a 3 -f -T -t #{time_limit} #{JAVA_OPTION} -i #{input_file_name} -o output.txt /usr/bin/java #{classname} 2>run_result" |
|
107 | run_command = "#{problem_home}/script/box -a 3 -f -T -t #{time_limit} #{JAVA_OPTION} -i #{input_file_name} -o output.txt /usr/bin/java #{classname} 2>run_result" |
|
108 | when "ruby" |
|
108 | when "ruby" |
|
109 | - run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit} -m #{mem_limit} #{RUBY_OPTION} -i #{input_file_name} -o output.txt /usr/bin/ruby #{program_name} 2>run_result" |
|
109 | + run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit*2} -m #{mem_limit} #{RUBY_OPTION} -i #{input_file_name} -o output.txt /usr/bin/ruby #{program_name} 2>run_result" |
|
110 | when "python" |
|
110 | when "python" |
|
111 | - run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit} -m #{mem_limit} #{PYTHON_OPTION} -i #{input_file_name} -o output.txt /usr/bin/python #{program_name} 2>run_result" |
|
111 | + run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit*2} -m #{mem_limit} #{PYTHON_OPTION} -i #{input_file_name} -o output.txt /usr/bin/python #{program_name} 2>run_result" |
|
112 | when "php" |
|
112 | when "php" |
|
113 | - run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit} #{PHP_OPTION} -i #{input_file_name} -o output.txt /usr/bin/php #{program_name} 2>run_result" |
|
113 | + run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit*2} #{PHP_OPTION} -i #{input_file_name} -o output.txt /usr/bin/php #{program_name} 2>run_result" |
|
114 | else # for c++, pascal, we do the normal checking |
|
114 | else # for c++, pascal, we do the normal checking |
|
115 | run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit} -m #{mem_limit} -i #{input_file_name} -o output.txt #{program_name} 2>run_result" |
|
115 | run_command = "#{problem_home}/script/box -a 2 -f -T -t #{time_limit} -m #{mem_limit} -i #{input_file_name} -o output.txt #{program_name} 2>run_result" |
|
116 | end |
|
116 | end |
|
117 |
|
117 | ||
|
118 |
|
118 | ||
|
119 | log "Running test #{test_num}..." |
|
119 | log "Running test #{test_num}..." |
|
120 | log run_command |
|
120 | log run_command |
|
121 | log |
|
121 | log |
|
122 | system(run_command) |
|
122 | system(run_command) |
|
123 |
|
123 | ||
|
124 | # Restore PROBLEM_HOME |
|
124 | # Restore PROBLEM_HOME |
|
125 | ENV['PROBLEM_HOME'] = problem_home |
|
125 | ENV['PROBLEM_HOME'] = problem_home |
You need to be logged in to leave comments.
Login now