Commit 1f35bc7b authored by Brian Panneton's avatar Brian Panneton Committed by Kenneth Leiter

ENH: Added distinction between core and not core with testing suite.

Tests that are within core, are now labled as such:
	(language)Core_(TestName)
Also updated format for Java and Python Test Output
parent c615f02d
......@@ -8,7 +8,7 @@ ENDIF(WIN32)
SET(ENV{LD_LIBRARY_PATH} "${LDPATH}$ENV{LD_LIBRARY_PATH}")
SET(ENV{CLASSPATH} "${CLASSPATH}$ENV{CLASSPATH}")
MESSAGE("CALLING: ${java_runtime} ${EXECUTABLE} ${ARGUMENTS}")
MESSAGE("| Calling:\t${java_runtime} ${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS(
COMMAND ${java_runtime} ${EXECUTABLE} ${ARGUMENTS}
WORKING_DIRECTORY ${java_binary_dir}
......@@ -17,10 +17,17 @@ EXECUTE_PROCESS(
ERROR_VARIABLE java_error
)
MESSAGE("Result: ${java_result}")
MESSAGE("Output: ${java_output}")
MESSAGE("Error: ${java_error}")
MESSAGE("| Call Result:\t${java_result}")
MESSAGE("| Call Output: Begin\n${java_output}")
MESSAGE("| Call Output: End")
IF(java_error)
MESSAGE("| Call Error: Begin\n${java_error}")
MESSAGE("| Call Error: End")
ENDIF(java_error)
MESSAGE("| Call Ended")
MESSAGE("----------------------------------------------------------")
IF(java_result)
MESSAGE(SEND_ERROR "${java_result}")
ENDIF(java_result)
# Let's make sure that if the test failed, it failed with CTest too
IF(java_error)
MESSAGE(SEND_ERROR "Test Failed.")
ENDIF(java_error)
......@@ -7,8 +7,7 @@ ENDIF(WIN32)
SET(ENV{PYTHONPATH} "${PYTHONPATH}$ENV{PYTHONPATH}")
MESSAGE("CALLING: ${python_runtime} ${EXECUTABLE} ${ARGUMENTS}")
MESSAGE("| Calling:\t${python_runtime} ${EXECUTABLE} ${ARGUMENTS}")
EXECUTE_PROCESS(
COMMAND ${python_runtime} ${EXECUTABLE}.pyc ${ARGUMENTS}
WORKING_DIRECTORY ${python_binary_dir}
......@@ -17,10 +16,17 @@ EXECUTE_PROCESS(
ERROR_VARIABLE python_error
)
MESSAGE("Result: ${python_result}")
MESSAGE("Output: ${python_output}")
MESSAGE("Error: ${python_error}")
MESSAGE("| Call Result:\t${python_result}")
MESSAGE("| Call Output: Begin\n${python_output}")
MESSAGE("| Call Output: End")
IF(python_error)
MESSAGE("Call Error: Begin\n${python_error}")
MESSAGE("Call Error: End")
ENDIF(python_error)
MESSAGE("| Call Ended")
MESSAGE("----------------------------------------------------------")
# Let's make sure that if the test failed, it failed with CTest too
IF(python_result)
MESSAGE(SEND_ERROR "${python_result}")
ENDIF(python_result)
......
......@@ -26,6 +26,12 @@
ENDIF(EXISTS ${cxx_source_dir}/${executable}.cxx)
TARGET_LINK_LIBRARIES(${executable} ${cxx_dependencies})
ADD_TEST(Cxx_${executable} ${executable} ${arguments})
STRING(REGEX MATCH "core" is_core "${cxx_binary_dir}")
IF(EXISTS ${is_core})
SET(is_core "Core")
ENDIF(EXISTS ${is_core})
ADD_TEST(Cxx${is_core}_${executable} ${executable} ${arguments})
ENDMACRO(ADD_CXX_TEST executable)
......@@ -39,7 +39,13 @@ MACRO(ADD_JAVA_TEST executable)
SET_PROPERTY(GLOBAL APPEND PROPERTY JAVA_TEST_TARGETS "${java_binary_dir}/${executable}.class")
ADD_TEST(Java_${executable} ${CMAKE_COMMAND}
STRING(REGEX MATCH "core" is_core "${java_binary_dir}")
IF(EXISTS ${is_core})
SET(is_core "Core")
ENDIF(EXISTS ${is_core})
ADD_TEST(Java${is_core}_${executable} ${CMAKE_COMMAND}
-D EXECUTABLE=${executable}
-D ARGUMENTS=${arguments}
-D CLASSPATH=${java_classpath}
......
......@@ -42,8 +42,13 @@ MACRO(ADD_PYTHON_TEST executable)
)
SET_PROPERTY(GLOBAL APPEND PROPERTY PYTHON_TEST_TARGETS "${python_binary_dir}/${executable}.pyc")
STRING(REGEX MATCH "core" is_core "${python_binary_dir}")
IF(EXISTS ${is_core})
SET(is_core "Core")
ENDIF(EXISTS ${is_core})
ADD_TEST(Python_${executable} ${CMAKE_COMMAND}
ADD_TEST(Python${is_core}_${executable} ${CMAKE_COMMAND}
-D EXECUTABLE=${executable}
-D ARGUMENTS=${arguments}
-D PYTHONPATH=${python_pythonpath}
......
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