test/test_coderunner.rb in coderunner-0.12.10 vs test/test_coderunner.rb in coderunner-0.12.11
- old
+ new
@@ -23,11 +23,17 @@
class TestSubmission < Test::Unit::TestCase
def setup
string = $cpp_command + ' ../cubecalc.cc -o cubecalc'
FileUtils.makedirs('test/submission_results')
Dir.chdir('test/submission_results'){assert_system string}
+ CodeRunner.setup_run_class('cubecalc', modlet: 'sleep')
end
+ def test_setup_run_class
+ assert(CodeRunner::Cubecalc::Sleep.ancestors.include?(CodeRunner::SYSTEM_MODULE), "CodeRunner::Cubecalc.ancestors.include? CodeRunner::SYS, ancestors: #{CodeRunner::Cubecalc.ancestors}")
+ assert(CodeRunner::Cubecalc::Sleep.rcp.user_defaults_location?, "CodeRunner::Cubecalc::Sleep.rcp.user_defaults_location? #{CodeRunner::Cubecalc::Sleep.rcp.user_defaults_location?}")
+ assert_equal(ENV['HOME'] + '/.coderunner/cubecalccrmod/defaults_files', CodeRunner::Cubecalc::Sleep.rcp.user_defaults_location)
+ end
def test_submission
CodeRunner.submit(Y: 'test/submission_results', C: 'cubecalc', m: 'empty', X: Dir.pwd + '/test/submission_results/cubecalc')
CodeRunner.status(Y: 'test/submission_results')
assert(FileTest.exist?('test/submission_results/v'))
assert(FileTest.exist?('test/submission_results/v/id_1'))
@@ -233,10 +239,11 @@
#Process.kill 'TERM', pid1
end
end
def test_graphkit_multiplot
+ unless ENV['SHORT_TEST']
Dir.chdir('test/results') do
######################
# Make 3 random graphs
######################
@@ -308,9 +315,10 @@
#system "okular #{Dir.pwd}/all_graphs.eps"
assert_equal("all_graphs.eps: PostScript document text conforming DSC level 2.0, type EPS\n", `file all_graphs.eps`)
end # Dir.chdir
+ end # unless
end # def
end # class TestCodeRunner