mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Have update_results.py run OpenMC twice when generating results for
test_source_file. Closes #288 on github.
This commit is contained in:
parent
4982ead230
commit
465d7c66fb
1 changed files with 14 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue