From 5dd1e81522efdedfe581c1b460278a93c71f132b Mon Sep 17 00:00:00 2001 From: Dilawar Singh <dilawars@ncbs.res.in> Date: Sat, 19 Nov 2016 15:48:49 +0530 Subject: [PATCH] Added some sanity tests for both moose and moogli. --- CMakeLists.txt | 16 +++++++++++++++- build_moose_core.sh.in | 2 +- moose-core/VERSION | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5c21fe8..73a52f30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,14 @@ add_custom_command( OUTPUT ${OUTPUT_MOOSEBIN} ) find_package(PythonInterp REQUIRED) + ## moose-gui ## TODO: moose-gui should be a python module. set(MOOSE_GUI_DIR ${CMAKE_SOURCE_DIR}/moose-gui) install(DIRECTORY ${MOOSE_CORE_INSTALL_DIR}/ DESTINATION ${CMAKE_INSTALL_PREFIX} + PATTERN ".git" EXCLUDE ) install(DIRECTORY ${MOOSE_GUI_DIR} @@ -44,7 +46,8 @@ install(DIRECTORY ${MOOSE_GUI_DIR} PATTERN ".git" EXCLUDE ) -install(PROGRAMS ${DATA_DIR}/moosegui +configure_file( ${CMAKE_SOURCE_DIR}/cmake/moose.in ${CMAKE_BINARY_DIR}/moose ) +install(PROGRAMS ${CMAKE_BINARY_DIR}/moose DESTINATION bin ) @@ -64,3 +67,14 @@ add_custom_command(OUTPUT __uninstall_moose-gui__ ${CMAKE_INSTALL_PREFIX}/lib/moose/gui COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moosegui ) + +################################################################################ +# CTEST +################################################################################# +enable_testing( ) +add_test( NAME test_pymoose_sanity COMMAND ${PYTHON_EXECUTABLE} -c "import moose") +add_test( NAME test_moogli_sanity COMMAND ${PYTHON_EXECUTABLE} -c "import moogli") + +set_tests_properties( test_pymoose_sanity test_moogli_sanity + PROPERTIES ENVIRONMENT "PYTHONPATH=${MOOSE_CORE_BUILD_DIR}/python" + ) diff --git a/build_moose_core.sh.in b/build_moose_core.sh.in index b0dc795a..ca3efbed 100755 --- a/build_moose_core.sh.in +++ b/build_moose_core.sh.in @@ -15,7 +15,7 @@ echo "Building MOOSE" @CMAKE_MOOSE_CORE_ARGS@ \ @MOOSE_CORE_SOURCE_DIR@ $MAKE + ctest -V || echo "Some tests failed" $MAKE install - ctest --output-on-failure || echo "Some tests failed" ) diff --git a/moose-core/VERSION b/moose-core/VERSION index 50e47c89..5d81ec09 100644 --- a/moose-core/VERSION +++ b/moose-core/VERSION @@ -1 +1 @@ -3.1.1 \ No newline at end of file +3.1.1-66-gc180075 \ No newline at end of file -- GitLab