test/test_coderunner.rb in coderunner-0.18.2 vs test/test_coderunner.rb in coderunner-0.18.3
- old
+ new
@@ -42,19 +42,19 @@
assert(FileTest.exist?('test/submission_results/v/id_1/test_coderunner.rb'))
assert(FileTest.exist?('test/submission_results/cubecalc_defaults.rb'))
end
def test_status_loop
unless ENV['SHORT_TEST']
- ENV['CODE_RUNNER_LAUNCHER'] = '42323490qw4q4432407Q2342U3'
+ CodeRunner::GLOBAL_OPTIONS[:launcher] = '42323490qw4q4432407Q2342U3'
#@mutex = Mutex.new
#@launcher_started =
@thread = Thread.new{CodeRunner.start_launcher(0.5,10)}
sleep 0.1 while not FileTest.exist?(CodeRunner.launcher_directory)
CodeRunner.submit(Y: 'test/submission_results', C: 'cubecalc', m: 'sleep', X: Dir.pwd + '/test/submission_results/cubecalc', p: '{sleep_time: 2}')
CodeRunner.status_loop(Y: 'test/submission_results')
#@thread.kill # This is commented out because it causes a Heisenbug... the kill signal can get trapped and cause the deletion of the 'submitting' lock file. This line is unnecessary because the thread will die when the program exits
- ENV.delete('CODE_RUNNER_LAUNCHER')
+ CodeRunner::GLOBAL_OPTIONS[:launcher] = nil
end
end
def testanalysis
CodeRunner.submit(Y: 'test/submission_results', C: 'cubecalc', m: 'empty', X: Dir.pwd + '/test/submission_results/cubecalc', p: '{width: 2.0, height: 3.0}')
runner = CodeRunner.fetch_runner(Y: 'test/submission_results')
@@ -382,10 +382,10 @@
#end
#end
#end
#
#
-ENV['CR_NON_INTERACTIVE'] = 'true'
+CodeRunner::GLOBAL_OPTIONS[:non_interactive] = true
class TestFortranNamelistC < MiniTest::Test
def setup
end
def test_synchronise_variables
#FileUtils.rm('lib/cubecalccrmod/namelists.rb')