diff options
author | William R. Dieter <william.r.dieter@intel.com> | 2021-01-15 07:03:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-28 14:05:35 (GMT) |
commit | f5d79dec5345473cd09a0f56e4603073baf84065 (patch) | |
tree | 66dcaabbeee991fa6e7df6e795c682ce8ff0de62 /Tests/RunCMake/CPack | |
parent | f6f048898d4bfd7223c454de75167af2c2425b63 (diff) | |
download | CMake-f5d79dec5345473cd09a0f56e4603073baf84065.zip CMake-f5d79dec5345473cd09a0f56e4603073baf84065.tar.gz CMake-f5d79dec5345473cd09a0f56e4603073baf84065.tar.bz2 |
Tests: Cleanup CPack message when files are expected and none are found
Previously, when looking for exactly one file and the number of files
was not one, the test printed out an error message saying that too many
files were found, then printing the list of files. However, 0 is not
1 and also not too many files.
To reduce confusion, this commit adds a different message when 0 files
are found and 1 is expected.
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r-- | Tests/RunCMake/CPack/VerifyResult.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake index 345b37f..0ab545a 100644 --- a/Tests/RunCMake/CPack/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/VerifyResult.cmake @@ -79,6 +79,11 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0) "which does not match:${msg_expected}\n" "${output_error_message}") endif() + elseif(foundFilescount_ EQUAL 0) + message(FATAL_ERROR + "Found no files for file No. '${file_no_}'!" + " Globbing expression: '${EXPECTED_FILE_${file_no_}}'" + "${output_error_message}") else() message(FATAL_ERROR "Found more than one file for file No. '${file_no_}'!" |