Show More
Commit Description:
add option -A <opt> to box. This options allow more argument to be explicitly passed to the program...
Commit Description:
add option -A <opt> to box. This options allow more argument to be explicitly passed to the program We have to use this because if the argument we wish to pass to the program is option (in -? format), box will intepret it as its option and failed accordingly. be noted that, by the definition of getopt, these options will be put after original argument (check the code for more info)
References:
File last commit:
Show/Diff file:
Action:
test/engine_spec_helper.rb | 31 lines | 915 B | text/x-ruby | RubyLexer |
Jittat Fakcharoenphol
removed many 'system' invokations
r101 require 'fileutils'
jittat
[grader] [MERGED] Merged new-arch-branch changes 74:105 into the trunk...
r23 module GraderEngineHelperMethods
def clear_sandbox
config = Grader::Configuration.get_instance
Jittat Fakcharoenphol
removed many 'system' invokations
r101 FileUtils.rm_rf(Dir.glob("#{config.test_sandbox_dir}/*"),
:secure => true)
jittat
[grader] [MERGED] Merged new-arch-branch changes 74:105 into the trunk...
r23 end
def init_sandbox
config = Grader::Configuration.get_instance
clear_sandbox
jittat
[grader] engine_spec: fix reg-ex new line problem, change test case for 1.5 sec submission (as the machine is a little faster)...
r39 FileUtils.mkdir_p config.user_result_dir
Jittat Fakcharoenphol
fixed grader to work with ruby 1.9
r137 FileUtils.cp_r("#{config.test_data_dir}/ev", "#{config.test_sandbox_dir}",:preserve => true)
jittat
[grader] [MERGED] Merged new-arch-branch changes 74:105 into the trunk...
r23 end
def create_submission_from_file(id, user, problem,
source_fname, language=nil)
language = stub(Language, :name => 'c', :ext => 'c') if language==nil
config = Grader::Configuration.get_instance
source = File.open(config.test_data_dir + "/" + source_fname).read
stub(Submission,
:id => id, :user => user, :problem => problem,
:source => source, :language => language)
end
end