Commit 95f13440 authored by Purves, Murray's avatar Purves, Murray
Browse files

Moving python test to test directory

parent 80a0ca0d
Pipeline #28446 failed with stages
in 55 seconds
......@@ -18,6 +18,7 @@ IF(Python3_FOUND)
SET(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/radixmathpy/setup.py")
CONFIGURE_FILE(${SETUP_PY_IN} ${SETUP_PY})
# Set the commands to build and install the python package
SET(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/radixmathpy/build_output")
ADD_CUSTOM_COMMAND(
OUTPUT ${OUTPUT}
......@@ -26,10 +27,10 @@ IF(Python3_FOUND)
DEPENDS ""
)
ADD_CUSTOM_TARGET(target ALL DEPENDS ${OUTPUT})
INSTALL(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} install --prefix=${CMAKE_INSTALL_PREFIX})")
ADD_TEST(NAME radixmathpy_test COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/radixmathpy/test.py" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
# Add the tests
TRIBITS_ADD_TEST_DIRECTORIES("radixmathpy/tests")
ELSE()
MESSAGE(WARNING "Not found Python 3: not including bindings")
......
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
LIB_REQUIRED_PACKAGES radixmath
LIB_OPTIONAL_PACKAGES
TEST_REQUIRED_PACKAGES
TEST_OPTIONAL_PACKAGES
LIB_REQUIRED_TPLS
LIB_OPTIONAL_TPLS
TEST_REQUIRED_TPLS
TEST_OPTIONAL_TPLS
)
# Add Python tests for radixmath
ADD_TEST(NAME test_interpolate_py COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/test_interpolate.py" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
\ No newline at end of file
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