Have update_results.py run OpenMC twice when generating results for

test_source_file. Closes #288 on github.
This commit is contained in:
Paul Romano 2014-07-31 20:35:40 -04:00
parent 4982ead230
commit 465d7c66fb

View file

@ -56,6 +56,20 @@ for adir in sorted(folders):
for i in range(35 - sz):
print('.', end="")
if adir == 'test_source_file':
# Handle source file test separately since it requires running OpenMC
# twice
if os.path.exists('results_error.dat'):
os.remove('results_error.dat')
proc = Popen(['python', 'test_source_file.py', '--exe', openmc_exe],
stderr=STDOUT, stdout=PIPE)
returncode = proc.wait()
if os.path.exists('results_error.dat'):
os.rename('results_error.dat', 'results_true.dat')
print(BOLD + OKGREEN + "[OK]" + ENDC)
os.chdir('..')
continue
# Run openmc
proc = Popen([openmc_exe], stderr=STDOUT, stdout=PIPE)
returncode = proc.wait()