From a4c829167dc8fa24e151d2afde7896b4588b24ad Mon Sep 17 00:00:00 2001 From: Domen Vrankar Date: Tue, 31 Oct 2017 12:19:10 +0100 Subject: CPack test: expand output checking fallback Some tests can have the same output for a certain subtest no matter which packaging generator is used. --- Tests/RunCMake/CPack/CPackTestHelpers.cmake | 2 ++ Tests/RunCMake/CPack/README.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index f883c69..5337b2c 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -68,6 +68,8 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt) set(RunCMake-std${o}-file "tests/${TEST_NAME}/${TEST_TYPE}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/${TEST_TYPE}/default_expected_std${o}.txt) set(RunCMake-std${o}-file "${TEST_TYPE}/default_expected_std${o}.txt") endif() diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index 5a95927..5877f97 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -167,6 +167,7 @@ NOTE: For subtests generator name can also be suffixed with subtest name and/or - generator name + packaging type - generator name + subtest name - generator name + - subtest name - default generator File name format: '---std.txt' where can either be 'out' or 'err'. -- cgit v0.12