mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
addresses @paulromano comments for python syntax and ctest version
This commit is contained in:
parent
cd2a44c428
commit
e94f84c1e2
4 changed files with 11 additions and 11 deletions
|
|
@ -158,4 +158,4 @@ from your private repository into a public fork.
|
|||
.. _mit-crpg/openmc: https://github.com/mit-crpg/openmc
|
||||
.. _paid plan: https://github.com/plans
|
||||
.. _Bitbucket: https://bitbucket.org
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.8/ctest.html
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.12/ctest.html
|
||||
|
|
|
|||
|
|
@ -490,4 +490,4 @@ schemas.xml file in your own OpenMC source directory.
|
|||
.. _GNU Emacs: http://www.gnu.org/software/emacs/
|
||||
.. _validation: http://en.wikipedia.org/wiki/XML_validation
|
||||
.. _RELAX NG: http://relaxng.org/
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.8/ctest.html
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.12/ctest.html
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ can run:
|
|||
|
||||
python run_tests.py -p
|
||||
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.8/ctest.html
|
||||
.. _ctest: http://www.cmake.org/cmake/help/v2.8.12/ctest.html
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class Test(object):
|
|||
make_list = ['make','-s']
|
||||
|
||||
# Check for parallel
|
||||
if opts.n_procs != None:
|
||||
if opts.n_procs is not None:
|
||||
make_list.append('-j')
|
||||
make_list.append(opts.n_procs)
|
||||
|
||||
|
|
@ -110,12 +110,12 @@ class Test(object):
|
|||
ctest_list = ['ctest']
|
||||
|
||||
# Check for parallel
|
||||
if opts.n_procs != None:
|
||||
if opts.n_procs is not None:
|
||||
ctest_list.append('-j')
|
||||
ctest_list.append(opts.n_procs)
|
||||
|
||||
# Check for subset of tests
|
||||
if opts.regex_tests != None:
|
||||
if opts.regex_tests is not None:
|
||||
ctest_list.append('-R')
|
||||
ctest_list.append(opts.regex_tests)
|
||||
|
||||
|
|
@ -179,14 +179,14 @@ if opts.print_build_configs:
|
|||
exit()
|
||||
|
||||
# Delete items of dictionary that don't match regular expression
|
||||
if opts.build_config != None:
|
||||
for key in iter(tests):
|
||||
if opts.build_config is not None:
|
||||
for key in tests:
|
||||
if not re.search(opts.build_config, key):
|
||||
del tests[key]
|
||||
|
||||
# Begin testing
|
||||
call(['rm','-rf','build'])
|
||||
for test in iter(tests):
|
||||
shutil.rmtree('build', ignore_errors=True)
|
||||
for test in tests:
|
||||
print('-'*(len(test) + 6))
|
||||
print(test + ' tests')
|
||||
print('-'*(len(test) + 6))
|
||||
|
|
@ -212,7 +212,7 @@ for test in iter(tests):
|
|||
'LastTest_{0}.log'.format(test))
|
||||
|
||||
# Clean up build
|
||||
call(['rm','-rf','build'])
|
||||
shutil.rmtree('build', ignore_errors=True)
|
||||
|
||||
# Print out summary of results
|
||||
print('\n' + '='*54)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue