diff --git a/test/core/ExamplesUnitTests/TribitsExampleProject2_Tests.cmake b/test/core/ExamplesUnitTests/TribitsExampleProject2_Tests.cmake index 002c3de2f..d19b4ec27 100644 --- a/test/core/ExamplesUnitTests/TribitsExampleProject2_Tests.cmake +++ b/test/core/ExamplesUnitTests/TribitsExampleProject2_Tests.cmake @@ -1224,11 +1224,12 @@ function(TribitsExampleProject2_External_RawPackage1_then_Package_by_Package ARGS -s ${${PROJECT_NAME}_TRIBITS_DIR}/examples/TribitsExampleProject2 . TEST_1 - MESSAGE "Configure to build and install just Package1 using raw CMake build system" + MESSAGE "Configure to build, install, and test just Package1 using its raw CMake build system" WORKING_DIRECTORY Build_Package1 CMND ${CMAKE_COMMAND} ARGS ${TribitsExampleProject2_COMMON_CONFIG_ARGS} + -DPackage1_ENABLE_TESTS=ON -DCMAKE_PREFIX_PATH=${tplInstallBaseDir}/install_tpl1 -DCMAKE_INSTALL_PREFIX=../install_package1 ../TribitsExampleProject2/packages/package1 @@ -1247,6 +1248,16 @@ function(TribitsExampleProject2_External_RawPackage1_then_Package_by_Package CMND ${CMAKE_COMMAND} ARGS --build . --target install TEST_3 + MESSAGE "Test just Package1" + WORKING_DIRECTORY Build_Package1 + SKIP_CLEAN_WORKING_DIRECTORY + CMND ${CMAKE_CTEST_COMMAND} + PASS_REGULAR_EXPRESSION_ALL + "1/1 Test [#]1: Package1_Prg [.]* *Passed" + "100% tests passed, 0 tests failed out of 1" + ALWAYS_FAIL_ON_NONZERO_RETURN + + TEST_4 MESSAGE "Configure to build, install, and test Package2" WORKING_DIRECTORY Build_Package2 CMND ${CMAKE_COMMAND} @@ -1300,13 +1311,13 @@ function(TribitsExampleProject2_External_RawPackage1_then_Package_by_Package # dependencies (i.e. Tpl1) as TriBITS-compliant external packages (which # shows that the TriBITS project must find Tpl1 again from scratch). - TEST_4 + TEST_5 MESSAGE "Build and install just Package2" WORKING_DIRECTORY Build_Package2 SKIP_CLEAN_WORKING_DIRECTORY CMND ${CMAKE_COMMAND} ARGS --build . --target install - TEST_5 + TEST_6 MESSAGE "Run tests for Package2" WORKING_DIRECTORY Build_Package2 SKIP_CLEAN_WORKING_DIRECTORY @@ -1316,7 +1327,7 @@ function(TribitsExampleProject2_External_RawPackage1_then_Package_by_Package "100% tests passed, 0 tests failed out of 1" ALWAYS_FAIL_ON_NONZERO_RETURN - TEST_6 + TEST_7 MESSAGE "Configure to build, test, and install the rest of TribitsExampleProject2 (Package2)" WORKING_DIRECTORY Build CMND ${CMAKE_COMMAND} @@ -1374,13 +1385,13 @@ function(TribitsExampleProject2_External_RawPackage1_then_Package_by_Package # the needed info from Tpl1, Tpl2, and Tpl3 is pulled in from # find_package(Package2). - TEST_7 + TEST_8 MESSAGE "Build and install the rest of TribitsExampleProject2 (Package3)" WORKING_DIRECTORY Build SKIP_CLEAN_WORKING_DIRECTORY CMND ${CMAKE_COMMAND} ARGS --build . --target install - TEST_8 + TEST_9 MESSAGE "Run remaining tests for TribitsExampleProject2 (Package3)" WORKING_DIRECTORY Build SKIP_CLEAN_WORKING_DIRECTORY