Commit 267b0f4a authored by Brian Panneton's avatar Brian Panneton Committed by Kenneth Leiter

ENH: Added support for 'make clean' into the Testing Suite

Added macro CLEAN_(language)_TEST() which takes in the executable
name and a list of output files that need to be removed during
'make clean.'
parent c64ed564
......@@ -35,3 +35,14 @@
ADD_TEST(Cxx${is_core}_${executable} ${executable} ${arguments})
ENDMACRO(ADD_CXX_TEST executable)
# CXX Clean Macro
# Author: Brian Panneton
# Description: This macro sets up the cxx test for a make clean.
# Parameters:
# executable = executable name
# ${ARGN} = files that the executable created
MACRO(CLEAN_CXX_TEST executable)
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES ${ARGN}
)
ENDMACRO(CLEAN_CXX_TEST executable)
......@@ -55,5 +55,18 @@ MACRO(ADD_JAVA_TEST executable)
ENDMACRO(ADD_JAVA_TEST)
# Java Clean Macro
# Author: Brian Panneton
# Description: This macro sets up the java test for a make clean.
# Parameters:
# executable = executable name
# ${ARGN} = files that the executable created
MACRO(CLEAN_JAVA_TEST executable)
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES ${ARGN}
)
ENDMACRO(CLEAN_JAVA_TEST executable)
# Configure the java 'driver' file
CONFIGURE_FILE(${java_configure_files}/JavaTestDriver.cmake.in ${java_binary_dir}/JavaTestDriver.cmake @ONLY)
......@@ -57,6 +57,19 @@ MACRO(ADD_PYTHON_TEST executable)
ENDMACRO(ADD_PYTHON_TEST)
# Python Clean Macro
# Author: Brian Panneton
# Description: This macro sets up the python test for a make clean.
# Parameters:
# executable = executable name
# ${ARGN} = files that the executable created
MACRO(CLEAN_PYTHON_TEST executable)
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES ${ARGN}
${executable}.py
)
ENDMACRO(CLEAN_PYTHON_TEST executable)
# Configure the python 'driver' file
CONFIGURE_FILE(${python_configure_files}/PythonTestDriver.cmake.in ${python_binary_dir}/PythonTestDriver.cmake @ONLY)
......@@ -9,7 +9,7 @@ include (UseCxxTest)
# Add any cxx tests here:
# Note: We don't want to use a foreach loop to test the files incase we
# have extra arguments (id: ADD_CXX_TEST(testname inputfile))
# have extra arguments (ie: ADD_CXX_TEST(testname inputfile))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
ADD_CXX_TEST(TestXdmfArray)
......@@ -17,3 +17,16 @@ ADD_CXX_TEST(TestXdmfArrayWriteRead)
ADD_CXX_TEST(TestXdmfHDF5Controller)
ADD_CXX_TEST(TestXdmfHDF5Writer)
ADD_CXX_TEST(TestXdmfInformation)
# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_CXX_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_CXX_TEST(TestXdmfArray)
CLEAN_CXX_TEST(TestXdmfArrayWriteRead
test.h5)
CLEAN_CXX_TEST(TestXdmfHDF5Controller)
CLEAN_CXX_TEST(TestXdmfHDF5Writer
hdf5WriterTest.h5)
CLEAN_CXX_TEST(TestXdmfInformation)
......@@ -26,6 +26,13 @@ include (UseJavaTest)
# ------------------------
# none
# Add any java cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_JAVA_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
# none
# Add a custom target for all java tests
# Note: ${TARGETS} is set in ADD_JAVA_TEST
GET_PROPERTY(targets GLOBAL PROPERTY JAVA_TEST_TARGETS)
......
......@@ -20,6 +20,13 @@ include(UsePythonTest)
# ---------------------
ADD_PYTHON_TEST(TestXdmfArray)
# Add any python cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_PYTHON_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_PYTHON_TEST(TestXdmfArray)
# Add a custom target for all python tests
# Note: ${TARGETS} is set in ADD_PYTHON_TEST
GET_PROPERTY(targets GLOBAL PROPERTY PYTHON_TEST_TARGETS)
......
......@@ -24,3 +24,37 @@ ADD_CXX_TEST(TestXdmfVisitorValueCounter)
ADD_CXX_TEST(TestXdmfWriter)
ADD_CXX_TEST(TestXdmfWriterHDF5ThenXML)
ADD_CXX_TEST(TestXdmfXPath)
# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_CXX_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_CXX_TEST(TestXdmfAttribute)
CLEAN_CXX_TEST(TestXdmfGeometry)
CLEAN_CXX_TEST(TestXdmfGrid)
CLEAN_CXX_TEST(TestXdmfGridCollection
TestXdmfGridCollection1.xmf
TestXdmfGridCollection2.xmf
TestXdmfGridCollectionHDF1.h5
TestXdmfGridCollectionHDF1.xmf
TestXdmfGridCollectionHDF2.xmf
)
CLEAN_CXX_TEST(TestXdmfReader
TestXdmfReader1.h5
TestXdmfReader1.xmf
TestXdmfReader2.xmf
)
CLEAN_CXX_TEST(TestXdmfSet)
CLEAN_CXX_TEST(TestXdmfTime)
CLEAN_CXX_TEST(TestXdmfTopology)
CLEAN_CXX_TEST(TestXdmfVisitorValueCounter)
CLEAN_CXX_TEST(TestXdmfWriter
output.h5
output.xmf)
CLEAN_CXX_TEST(TestXdmfWriterHDF5ThenXML)
CLEAN_CXX_TEST(TestXdmfXPath
XdmfXPath1.xmf
XdmfXPath2.xmf
)
......@@ -29,6 +29,15 @@ include (UseJavaTest)
# ------------------------
ADD_JAVA_TEST(TestXdmfJava)
# Add any java cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_JAVA_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_JAVA_TEST(TestXdmfJava
outputJavaTest.xmf
)
# Add a custom target for all java tests
# Note: ${TARGETS} is set in ADD_JAVA_TEST
IF(EXISTS Java_Core_Test_target)
......
......@@ -23,6 +23,19 @@ include(UsePythonTest)
ADD_PYTHON_TEST(TestXdmfHDF5Writer)
ADD_PYTHON_TEST(TestXdmfWriter)
# Add any python cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_PYTHON_TEST(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_PYTHON_TEST(TestXdmfHDF5Writer
hdf5WriterPythonTest.h5
)
CLEAN_PYTHON_TEST(TestXdmfWriter
output.h5
output.xmf
)
# Add a custom target for all python tests
# Note: ${TARGETS} is set in ADD_PYTHON_TEST
IF(EXISTS Python_Core_Test_target)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment