From 31503f93002a2d671bb94b8a18f0e883c5841896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 16:01:27 +0100 Subject: [PATCH 1/6] Enable testing facilities with root CMakeLists.txt --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c84ac39a9..013656398 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,3 +383,12 @@ endif ( ) #------------------------------------------------------------------------------- include ( SuiteSparseReport ) + +#------------------------------------------------------------------------------- +# enable testing facilities +#------------------------------------------------------------------------------- + +# Currently, only LAGraph and Mongoose have ctests. +# FIXME: Consider converting (some of) the existing demos to ctests. + +enable_testing ( ) From ca95cc7d395c36f4fae5820acda79ef9bc791cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 16:02:12 +0100 Subject: [PATCH 2/6] CI: Run ctest with root CMakeLists.txt Also split steps for configuration and building. --- .github/workflows/root-cmakelists.yaml | 43 ++++++++++++++++++++------ 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/root-cmakelists.yaml b/.github/workflows/root-cmakelists.yaml index c2da9c0dd..1e51a3dfb 100644 --- a/.github/workflows/root-cmakelists.yaml +++ b/.github/workflows/root-cmakelists.yaml @@ -109,9 +109,8 @@ jobs: ccache -s echo "/usr/lib/ccache" >> $GITHUB_PATH - - name: build libraries + - name: configure run: | - printf "::group:: \033[0;32m==>\033[0m Configuring\n" mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build cmake -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=".." \ @@ -121,10 +120,11 @@ jobs: -DBLA_VENDOR="OpenBLAS" \ ${{ matrix.cuda-cmake-flags }} \ .. - echo "::endgroup::" - printf "::group:: \033[0;32m==>\033[0m Building\n" + + - name: build libraries + run: | + cd ${GITHUB_WORKSPACE}/build cmake --build . - echo "::endgroup::" - name: build demos run: | @@ -150,6 +150,11 @@ jobs: path: ~/.ccache key: ${{ steps.ccache-prepare.outputs.key }} + - name: check + run: | + cd ${GITHUB_WORKSPACE}/build + ctest . || ctest . --rerun-failed --output-on-failure + - name: install run: | printf "\033[0;32m==>\033[0m Installing libraries\n" @@ -247,6 +252,7 @@ jobs: install: >- mingw-w64-ucrt-x86_64-gmp mingw-w64-ucrt-x86_64-mpfr + mingw-w64-ucrt-x86_64-python msystem: UCRT64 @@ -303,9 +309,8 @@ jobs: - name: setup MSVC toolchain uses: ilammy/msvc-dev-cmd@v1 - - name: build libraries + - name: configure run: | - printf "::group:: \033[0;32m==>\033[0m Configuring\n" mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build cmake -G"Ninja Multi-Config" \ -DCMAKE_BUILD_TYPE="Release" \ @@ -316,13 +321,25 @@ jobs: -DCMAKE_Fortran_COMPILER_LAUNCHER="ccache" \ -DNFORTRAN=ON \ -DBLA_VENDOR="All" \ + -DPython_EXECUTABLE="C:/msys64/ucrt64/bin/python.exe" \ .. + + - name: build libraries + run: | + cd ${GITHUB_WORKSPACE}/build + cmake --build . --config Release + + - name: build demos + run: | + printf "::group:: \033[0;32m==>\033[0m Configuring for demos\n" + cd ${GITHUB_WORKSPACE}/build + cmake -DDEMO=ON .. echo "::endgroup::" - printf "::group:: \033[0;32m==>\033[0m Building\n" + printf "::group:: \033[0;32m==>\033[0m Building demos\n" + cd ${GITHUB_WORKSPACE}/build cmake --build . --config Release echo "::endgroup::" - - # FIXME: Build and run tests and demos + # FIXME: How to run the demos without Makefile? - name: ccache status continue-on-error: true @@ -336,6 +353,12 @@ jobs: path: ${{ steps.ccache-prepare.outputs.ccachedir }} key: ${{ steps.ccache-prepare.outputs.key }} + - name: check + run: | + cd ${GITHUB_WORKSPACE}/build + PATH="${GITHUB_WORKSPACE}/bin;${GITHUB_WORKSPACE}/dependencies/bin;C:/msys64/ucrt64/bin;${PATH}" \ + ctest -C Release . || ctest -C Release . --rerun-failed --output-on-failure + - name: install run: | printf "\033[0;32m==>\033[0m Installing libraries\n" From 402784b36a70bdd1a55262e0999e601ac0c796df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 16:03:05 +0100 Subject: [PATCH 3/6] Mongoose: Prefix tests with `Mongoose_` for better identification --- Mongoose/CMakeLists.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt index 24f1b9d10..65bdf9b8f 100644 --- a/Mongoose/CMakeLists.txt +++ b/Mongoose/CMakeLists.txt @@ -308,11 +308,11 @@ if ( Python_Interpreter_FOUND ) set_target_properties ( mongoose_test_io PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) - add_test ( NAME IO_Test + add_test ( NAME Mongoose_IO_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t io -k ) if (WIN32) - set_tests_properties ( IO_Test PROPERTIES + set_tests_properties ( Mongoose_IO_Test PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) endif ( ) @@ -324,17 +324,17 @@ if ( Python_Interpreter_FOUND ) set_target_properties ( mongoose_test_edgesep PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) - add_test ( NAME Edge_Separator_Test + add_test ( NAME Mongoose_Edge_Separator_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t edgesep ) - add_test ( NAME Edge_Separator_Test_2 + add_test ( NAME Mongoose_Edge_Separator_Test_2 COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -t edgesep -i 21 39 191 1557 1562 353 2468 1470 1380 505 182 201 2331 760 1389 2401 2420 242 250 1530 1533 360 1437 ) - add_test ( NAME Weighted_Edge_Separator_Test + add_test ( NAME Mongoose_Weighted_Edge_Separator_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -t edgesep -i 2624 ) - add_test ( NAME Target_Split_Test + add_test ( NAME Mongoose_Target_Split_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t edgesep -s 0.3 ) if (WIN32) - set_tests_properties ( Edge_Separator_Test Edge_Separator_Test_2 Weighted_Edge_Separator_Test Target_Split_Test PROPERTIES + set_tests_properties ( Mongoose_Edge_Separator_Test Mongoose_Edge_Separator_Test_2 Mongoose_Weighted_Edge_Separator_Test Mongoose_Target_Split_Test PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) endif ( ) @@ -346,11 +346,11 @@ if ( Python_Interpreter_FOUND ) set_target_properties ( mongoose_test_memory PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) - add_test ( NAME Memory_Test + add_test ( NAME Mongoose_Memory_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t memory ) if (WIN32) - set_tests_properties ( Memory_Test PROPERTIES + set_tests_properties ( Mongoose_Memory_Test PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) endif ( ) @@ -371,13 +371,13 @@ if ( Python_Interpreter_FOUND ) set_target_properties ( mongoose_test_performance PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) - add_test ( NAME Performance_Test + add_test ( NAME Mongoose_Performance_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t performance -p ) - add_test ( NAME Performance_Test_2 + add_test ( NAME Mongoose_Performance_Test_2 COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -t performance -i 21 39 1557 1562 353 2468 1470 1380 505 182 201 2331 760 1389 2401 2420 242 250 1530 1533 -p ) if (WIN32) - set_tests_properties ( Performance_Test Performance_Test_2 PROPERTIES + set_tests_properties ( Mongoose_Performance_Test Mongoose_Performance_Test_2 PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) endif ( ) endif ( ) @@ -403,14 +403,14 @@ add_executable ( mongoose_unit_test_io Tests/Mongoose_UnitTest_IO_exe.cpp ) target_link_libraries ( mongoose_unit_test_io Mongoose_static_dbg ) set_target_properties ( mongoose_unit_test_io PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) -add_test ( NAME Unit_Test_IO +add_test ( NAME Mongoose_Unit_Test_IO COMMAND ${TESTING_OUTPUT_PATH}/mongoose_unit_test_io ) add_executable ( mongoose_unit_test_graph Tests/Mongoose_UnitTest_Graph_exe.cpp ) target_link_libraries ( mongoose_unit_test_graph Mongoose_static_dbg ) set_target_properties ( mongoose_unit_test_graph PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) -add_test ( NAME Unit_Test_Graph +add_test ( NAME Mongoose_Unit_Test_Graph COMMAND ${TESTING_OUTPUT_PATH}/mongoose_unit_test_graph WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Tests ) @@ -418,12 +418,12 @@ add_executable ( mongoose_unit_test_edgesep Tests/Mongoose_UnitTest_EdgeSep_exe.cpp ) target_link_libraries ( mongoose_unit_test_edgesep Mongoose_static_dbg ) set_target_properties ( mongoose_unit_test_edgesep PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) -add_test ( NAME Unit_Test_EdgeSep +add_test ( NAME Mongoose_Unit_Test_EdgeSep COMMAND ${TESTING_OUTPUT_PATH}/mongoose_unit_test_edgesep WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Tests ) if (WIN32) - set_tests_properties ( Unit_Test_IO Unit_Test_Graph Unit_Test_EdgeSep PROPERTIES + set_tests_properties ( Mongoose_Unit_Test_IO Mongoose_Unit_Test_Graph Mongoose_Unit_Test_EdgeSep PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) endif ( ) From 182a0791d141ca8b57be411a4815719da5c5942d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 16:04:31 +0100 Subject: [PATCH 4/6] LAGraph: Change prefix of tests to `LAGraph` or `LAGraphX` --- LAGraph/experimental/test/CMakeLists.txt | 2 +- LAGraph/src/test/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LAGraph/experimental/test/CMakeLists.txt b/LAGraph/experimental/test/CMakeLists.txt index 13e059b41..2ec4eaca8 100644 --- a/LAGraph/experimental/test/CMakeLists.txt +++ b/LAGraph/experimental/test/CMakeLists.txt @@ -90,7 +90,7 @@ foreach( testsourcefile ${TEST_SOURCES} ) C_STANDARD_REQUIRED ON C_STANDARD 11 ) target_link_libraries( ${testname} LAGraphX LAGraph lagraphxtest lagraphtest GraphBLAS::GraphBLAS ) - string( REPLACE "test_" "ctest_" ctestname ${testname}) + string( REPLACE "test_" "LAGraphX_" ctestname ${testname}) add_test( ${ctestname} ${testname} ) # add_test( NAME ${ctestname} COMMAND valgrind $ ) if (WIN32) diff --git a/LAGraph/src/test/CMakeLists.txt b/LAGraph/src/test/CMakeLists.txt index 17707599a..fafa73b27 100644 --- a/LAGraph/src/test/CMakeLists.txt +++ b/LAGraph/src/test/CMakeLists.txt @@ -91,7 +91,7 @@ foreach( testsourcefile ${TEST_SOURCES} ) C_STANDARD_REQUIRED ON C_STANDARD 11 ) target_link_libraries( ${testname} LAGraph LAGraphX lagraphtest GraphBLAS::GraphBLAS ) - string( REPLACE "test_" "ctest_" ctestname ${testname}) + string( REPLACE "test_" "LAGraph_" ctestname ${testname}) add_test( ${ctestname} ${testname} ) # add_test( NAME ${ctestname} COMMAND valgrind $ ) if (WIN32) From 406c8d8d972f9afb85b6fea6371b24aa32021989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 19:22:44 +0100 Subject: [PATCH 5/6] LAGraph: Make tests compatible with multi-config generators (like MSVC) --- LAGraph/CMakeLists.txt | 2 +- LAGraph/experimental/CMakeLists.txt | 2 +- LAGraph/experimental/test/CMakeLists.txt | 6 +++--- LAGraph/src/CMakeLists.txt | 2 +- LAGraph/src/test/CMakeLists.txt | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LAGraph/CMakeLists.txt b/LAGraph/CMakeLists.txt index 903735ccb..ef7618969 100644 --- a/LAGraph/CMakeLists.txt +++ b/LAGraph/CMakeLists.txt @@ -170,7 +170,7 @@ endif ( ) message ( STATUS "CMAKE build type: " ${CMAKE_BUILD_TYPE} ) message ( STATUS "CMAKE source directory: " ${PROJECT_SOURCE_DIR} ) -message ( STATUS "CMAKE build directory: " ${CMAKE_BINARY_DIR} ) +message ( STATUS "CMAKE build directory: " ${PROJECT_BINARY_DIR} ) if ( ${CMAKE_BUILD_TYPE} STREQUAL "Debug") message ( STATUS "CMAKE C Flags debug: " ${CMAKE_C_FLAGS_DEBUG} ) diff --git a/LAGraph/experimental/CMakeLists.txt b/LAGraph/experimental/CMakeLists.txt index 5b9cd042e..aa8a37838 100644 --- a/LAGraph/experimental/CMakeLists.txt +++ b/LAGraph/experimental/CMakeLists.txt @@ -31,7 +31,7 @@ SET_TARGET_PROPERTIES ( LAGraphX PROPERTIES C_STANDARD_REQUIRED ON C_STANDARD 11 PUBLIC_HEADER "include/LAGraphX.h" - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dlls ) + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dlls ) target_link_libraries ( LAGraphX PRIVATE LAGraph GraphBLAS::GraphBLAS ) target_include_directories ( LAGraphX PUBLIC diff --git a/LAGraph/experimental/test/CMakeLists.txt b/LAGraph/experimental/test/CMakeLists.txt index 2ec4eaca8..f4670e1f6 100644 --- a/LAGraph/experimental/test/CMakeLists.txt +++ b/LAGraph/experimental/test/CMakeLists.txt @@ -41,7 +41,7 @@ SET_TARGET_PROPERTIES ( lagraphxtest PROPERTIES SOVERSION ${LAGraph_VERSION_MAJOR} C_STANDARD_REQUIRED ON C_STANDARD 11 - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dlls ) + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dlls ) target_link_libraries ( lagraphxtest PRIVATE LAGraph lagraphtest GraphBLAS::GraphBLAS ) target_compile_definitions ( lagraphxtest PRIVATE LGX_TEST_LIBRARY ) target_compile_definitions ( lagraphxtest PUBLIC LGX_TEST_DLL ) @@ -91,11 +91,11 @@ foreach( testsourcefile ${TEST_SOURCES} ) C_STANDARD 11 ) target_link_libraries( ${testname} LAGraphX LAGraph lagraphxtest lagraphtest GraphBLAS::GraphBLAS ) string( REPLACE "test_" "LAGraphX_" ctestname ${testname}) - add_test( ${ctestname} ${testname} ) + add_test( NAME ${ctestname} COMMAND $ ) # add_test( NAME ${ctestname} COMMAND valgrind $ ) if (WIN32) set_tests_properties ( ${ctestname} PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${CMAKE_BINARY_DIR}/dlls" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$;PATH=path_list_prepend:$" ) endif ( ) endforeach( testsourcefile ${TEST_SOURCES} ) diff --git a/LAGraph/src/CMakeLists.txt b/LAGraph/src/CMakeLists.txt index ee1fa8c54..5b785d4a8 100644 --- a/LAGraph/src/CMakeLists.txt +++ b/LAGraph/src/CMakeLists.txt @@ -35,7 +35,7 @@ SET_TARGET_PROPERTIES ( LAGraph PROPERTIES C_STANDARD_REQUIRED ON C_STANDARD 11 PUBLIC_HEADER "include/LAGraph.h" - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dlls ) + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dlls ) target_link_libraries ( LAGraph PRIVATE GraphBLAS::GraphBLAS ${M_LIB} ) target_include_directories ( LAGraph PUBLIC diff --git a/LAGraph/src/test/CMakeLists.txt b/LAGraph/src/test/CMakeLists.txt index fafa73b27..9e73de799 100644 --- a/LAGraph/src/test/CMakeLists.txt +++ b/LAGraph/src/test/CMakeLists.txt @@ -43,7 +43,7 @@ SET_TARGET_PROPERTIES ( lagraphtest PROPERTIES SOVERSION ${LAGraph_VERSION_MAJOR} C_STANDARD_REQUIRED ON C_STANDARD 11 - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/dlls ) + RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/dlls ) target_link_libraries ( lagraphtest PRIVATE LAGraph GraphBLAS::GraphBLAS ) target_compile_definitions ( lagraphtest PRIVATE LG_TEST_LIBRARY ) target_compile_definitions ( lagraphtest PUBLIC LG_TEST_DLL ) @@ -92,11 +92,11 @@ foreach( testsourcefile ${TEST_SOURCES} ) C_STANDARD 11 ) target_link_libraries( ${testname} LAGraph LAGraphX lagraphtest GraphBLAS::GraphBLAS ) string( REPLACE "test_" "LAGraph_" ctestname ${testname}) - add_test( ${ctestname} ${testname} ) + add_test( NAME ${ctestname} COMMAND $ ) # add_test( NAME ${ctestname} COMMAND valgrind $ ) if (WIN32) set_tests_properties ( ${ctestname} PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${CMAKE_BINARY_DIR}/dlls" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$;PATH=path_list_prepend:$" ) endif ( ) endforeach( testsourcefile ${TEST_SOURCES} ) From c9339fab2c1574abbd351edbd61d9bf86b7f5375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Sun, 5 Nov 2023 19:44:31 +0100 Subject: [PATCH 6/6] Mongoose: Make tests compatible with multi-config generators (like MSVC) --- Mongoose/CMakeLists.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt index 65bdf9b8f..b7cfe970a 100644 --- a/Mongoose/CMakeLists.txt +++ b/Mongoose/CMakeLists.txt @@ -311,9 +311,9 @@ if ( Python_Interpreter_FOUND ) add_test ( NAME Mongoose_IO_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t io -k ) - if (WIN32) + if ( WIN32 ) set_tests_properties ( Mongoose_IO_Test PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" ) endif ( ) # Edge Separator Tests @@ -333,9 +333,9 @@ if ( Python_Interpreter_FOUND ) add_test ( NAME Mongoose_Target_Split_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t edgesep -s 0.3 ) - if (WIN32) + if ( WIN32 ) set_tests_properties ( Mongoose_Edge_Separator_Test Mongoose_Edge_Separator_Test_2 Mongoose_Weighted_Edge_Separator_Test Mongoose_Target_Split_Test PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" ) endif ( ) # Memory Tests @@ -349,9 +349,9 @@ if ( Python_Interpreter_FOUND ) add_test ( NAME Mongoose_Memory_Test COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -min 1 -max 15 -t memory ) - if (WIN32) + if ( WIN32 ) set_tests_properties ( Mongoose_Memory_Test PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" ) endif ( ) # Performance Test @@ -376,9 +376,9 @@ if ( Python_Interpreter_FOUND ) add_test ( NAME Mongoose_Performance_Test_2 COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Tests/runTests -t performance -i 21 39 1557 1562 353 2468 1470 1380 505 182 201 2331 760 1389 2401 2420 242 250 1530 1533 -p ) - if (WIN32) + if ( WIN32 ) set_tests_properties ( Mongoose_Performance_Test Mongoose_Performance_Test_2 PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" ) endif ( ) endif ( ) @@ -404,7 +404,8 @@ add_executable ( mongoose_unit_test_io target_link_libraries ( mongoose_unit_test_io Mongoose_static_dbg ) set_target_properties ( mongoose_unit_test_io PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TESTING_OUTPUT_PATH} ) add_test ( NAME Mongoose_Unit_Test_IO - COMMAND ${TESTING_OUTPUT_PATH}/mongoose_unit_test_io ) + COMMAND ${TESTING_OUTPUT_PATH}/mongoose_unit_test_io + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Tests ) add_executable ( mongoose_unit_test_graph Tests/Mongoose_UnitTest_Graph_exe.cpp ) @@ -424,7 +425,7 @@ add_test ( NAME Mongoose_Unit_Test_EdgeSep if (WIN32) set_tests_properties ( Mongoose_Unit_Test_IO Mongoose_Unit_Test_Graph Mongoose_Unit_Test_EdgeSep PROPERTIES - ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${PROJECT_BINARY_DIR}" ) + ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$" ) endif ( ) if ( $ENV{MONGOOSE_COVERAGE} )