Remove use of ctest / update_results.py

This commit is contained in:
Paul Romano 2018-01-29 14:05:48 -06:00
parent 0d3845c327
commit ea15a93104
4 changed files with 0 additions and 195 deletions

View file

@ -522,52 +522,3 @@ if(PYTHONINTERP_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")
endif()
endif()
#===============================================================================
# Regression tests
#===============================================================================
# This allows for dashboard configuration
include(CTest)
# Get a list of all the tests to run
file(GLOB_RECURSE TESTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test.py)
# Loop through all the tests
foreach(test ${TESTS})
# Remove unit tests
if(test MATCHES ".*unit_tests.*")
continue()
endif()
# Get test information
get_filename_component(TEST_NAME ${test} NAME)
get_filename_component(TEST_PATH ${test} PATH)
if (DEFINED ENV{MEM_CHECK})
# Generate input files if needed
if (NOT EXISTS "${TEST_PATH}/geometry.xml")
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${TEST_NAME} --build-inputs
WORKING_DIRECTORY ${TEST_PATH})
endif()
# Add serial test
add_test(NAME ${TEST_PATH}
WORKING_DIRECTORY ${TEST_PATH}
COMMAND $<TARGET_FILE:openmc>)
else()
# Check serial/parallel
if (${MPI_ENABLED})
# Preform a parallel test
add_test(NAME ${TEST_PATH}
WORKING_DIRECTORY ${TEST_PATH}
COMMAND ${PYTHON_EXECUTABLE} ${TEST_NAME} --exe $<TARGET_FILE:openmc>
--mpi_exec ${MPI_DIR}/mpiexec)
else()
# Perform a serial test
add_test(NAME ${TEST_PATH}
WORKING_DIRECTORY ${TEST_PATH}
COMMAND ${PYTHON_EXECUTABLE} ${TEST_NAME} --exe $<TARGET_FILE:openmc>)
endif()
endif()
endforeach(test)

View file

@ -1,23 +0,0 @@
#!/usr/bin/env python
import os
import glob
dirs = glob.glob('test_*')
for adir in dirs:
os.chdir(adir)
files = glob.glob('results.py')
if len(files) > 0:
files = files[0]
with open(files, 'r') as fh:
intxt = fh.read()
intxt = intxt.replace('14.8E', '12.6E')
with open(files, 'w') as fh:
fh.write(intxt)
os.chdir('..')

View file

@ -1,60 +0,0 @@
#!/usr/bin/env python
from __future__ import print_function
import os
import re
from subprocess import Popen, call, STDOUT, PIPE
from glob import glob
from optparse import OptionParser
parser = OptionParser()
parser.add_option('-R', '--tests-regex', dest='regex_tests',
help="Run tests matching regular expression. \
Test names are the directories present in tests folder.\
This uses standard regex syntax to select tests.")
(opts, args) = parser.parse_args()
cwd = os.getcwd()
# Terminal color configurations
OKGREEN = '\033[92m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
# Get a list of all test folders
folders = glob('test_*')
# Check to see if a subset of tests is specified on command line
if opts.regex_tests is not None:
folders = [item for item in folders if re.search(opts.regex_tests, item)]
# Loop around directories
for adir in sorted(folders):
# Go into that directory
os.chdir(adir)
pwd = os.path.abspath(os.path.dirname('settings.xml'))
os.putenv('PWD', pwd)
# Print status to screen
print(adir, end="")
sz = len(adir)
for i in range(35 - sz):
print('.', end="")
# Find the test executable
test_exec = glob('test_*.py')
assert len(test_exec) == 1, 'There must be only one test executable per ' \
'test directory'
# Update the test results
proc = Popen(['python', test_exec[0], '--update'])
returncode = proc.wait()
if returncode == 0:
print(BOLD + OKGREEN + "[OK]" + ENDC)
else:
print(BOLD + FAIL + "[FAILED]" + ENDC)
# Go back a directory
os.chdir('..')

View file

@ -1,63 +0,0 @@
{
Create HDF5 statepoint file
Memcheck:Addr4
fun:H5_build_extpath
fun:H5F_open
fun:H5Fcreate
fun:h5fcreate_c_
fun:__h5f_MOD_h5fcreate_f
fun:__hdf5_interface_MOD_hdf5_file_create
fun:__output_interface_MOD_file_create
fun:__state_point_MOD_write_state_point
fun:__eigenvalue_MOD_finalize_batch
fun:__eigenvalue_MOD_run_eigenvalue
fun:MAIN__
fun:main
}
{
Open HDF5 statepoint file
Memcheck:Addr4
fun:H5_build_extpath
fun:H5F_open
fun:H5Fopen
fun:h5fopen_c_
fun:__h5f_MOD_h5fopen_f
fun:__hdf5_interface_MOD_hdf5_file_open
fun:__output_interface_MOD_file_open
fun:__state_point_MOD_write_source_point
fun:__eigenvalue_MOD_finalize_batch
fun:__eigenvalue_MOD_run_eigenvalue
fun:MAIN__
fun:main
}
{
Create HDF5 summary file
Memcheck:Addr4
fun:H5_build_extpath
fun:H5F_open
fun:H5Fcreate
fun:h5fcreate_c_
fun:__h5f_MOD_h5fcreate_f
fun:__hdf5_interface_MOD_hdf5_file_create
fun:__output_interface_MOD_file_create
fun:__hdf5_summary_MOD_hdf5_write_summary
fun:__initialize_MOD_initialize_run
fun:MAIN__
fun:main
}
{
Create HDF5 track file
Memcheck:Addr4
fun:H5_build_extpath
fun:H5F_open
fun:H5Fcreate
fun:h5fcreate_c_
fun:__h5f_MOD_h5fcreate_f
fun:__hdf5_interface_MOD_hdf5_file_create
fun:__output_interface_MOD_file_create
fun:__track_output_MOD_finalize_particle_track
fun:__tracking_MOD_transport
fun:__eigenvalue_MOD_run_eigenvalue
fun:MAIN__
fun:main
}