diff options
author | Betsy McPhail <betsy.mcphail@kitware.com> | 2020-02-18 21:32:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-02-27 19:58:24 (GMT) |
commit | 07223c5c27f60472db2125df647c7e1818aa01bc (patch) | |
tree | 0f181ea2fb47e09bd08622d878d5fadc73655dba /Tests/CMakeLists.txt | |
parent | 21d72777fbbfcf2ab074f8f78838e487f144077d (diff) | |
download | CMake-07223c5c27f60472db2125df647c7e1818aa01bc.zip CMake-07223c5c27f60472db2125df647c7e1818aa01bc.tar.gz CMake-07223c5c27f60472db2125df647c7e1818aa01bc.tar.bz2 |
Tutorial: Update Step 5 to work on Windows
`log` and `exp` should be found on Windows systems now, as expected.
Update tests to be more specific in looking for the expected outcome of
the tutorial.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 33c7514..6f86a5f 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1605,7 +1605,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH DEPENDS ExternalProjectUpdateSetup ) # do each of the tutorial steps - function(add_tutorial_test step_name use_mymath) + function(add_tutorial_test step_name use_mymath tutorial_arg pass_regex) set(tutorial_test_name Tutorial${step_name}) set(tutorial_build_dir "${CMake_BINARY_DIR}/Tests/Tutorial/${step_name}") if (use_mymath) @@ -1623,19 +1623,28 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH ${build_generator_args} --build-project Tutorial --build-options ${tutorial_build_options} - --test-command Tutorial 25.0) + --test-command Tutorial ${tutorial_arg}) + set_tests_properties(${tutorial_test_name} PROPERTIES + PASS_REGULAR_EXPRESSION ${pass_regex}) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/${tutorial_build_dir}_Build") endfunction() if(NOT CMake_TEST_EXTERNAL_CMAKE) foreach(STP RANGE 2 12) - add_tutorial_test(Step${STP} TRUE) + if (STP EQUAL 6) + set(pass_regex ".*using log and exp") + else() + set(pass_regex "The square root of 25 is 5") + endif() + add_tutorial_test(Step${STP} TRUE 25 ${pass_regex}) endforeach() - add_tutorial_test(Complete TRUE) + set(pass_regex "The square root of 25 is 5") + add_tutorial_test(Complete TRUE 25 ${pass_regex}) foreach(STP RANGE 3 12) - add_tutorial_test(Step${STP} FALSE) + add_tutorial_test(Step${STP} FALSE 25 ${pass_regex}) endforeach() - add_tutorial_test(Complete FALSE) + add_tutorial_test(Complete FALSE 25 ${pass_regex}) endif() add_test(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} |