From 47d1f1189c53f02010d16ef541835c016fd8302d Mon Sep 17 00:00:00 2001 From: Domen Vrankar Date: Mon, 13 Jul 2015 22:21:34 +0200 Subject: Tests/RunCMake/CPack: found files should be preserved Package file names that are found during validation should be preserved in FOUND_FILE_${NO} variables that can be later used in custom VerifyResult scripts. --- Tests/RunCMake/CPack/VerifyResult.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake index 809011b..e059d9c 100644 --- a/Tests/RunCMake/CPack/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/VerifyResult.cmake @@ -15,13 +15,13 @@ include("${src_dir}/${GENERATOR_TYPE}/${RunCMake_TEST}-ExpectedFiles.cmake") if(NOT EXPECTED_FILES_COUNT EQUAL 0) foreach(file_no_ RANGE 1 ${EXPECTED_FILES_COUNT}) - file(GLOB foundFile_ RELATIVE "${bin_dir}" "${EXPECTED_FILE_${file_no_}}") - set(foundFiles_ "${foundFiles_};${foundFile_}") - list(LENGTH foundFile_ foundFilesCount_) + file(GLOB FOUND_FILE_${file_no_} RELATIVE "${bin_dir}" "${EXPECTED_FILE_${file_no_}}") + set(foundFiles_ "${foundFiles_};${FOUND_FILE_${file_no_}}") + list(LENGTH FOUND_FILE_${file_no_} foundFilesCount_) if(foundFilesCount_ EQUAL 1) unset(PACKAGE_CONTENT) - getPackageContent("${bin_dir}/${foundFile_}" "PACKAGE_CONTENT") + getPackageContent("${bin_dir}/${FOUND_FILE_${file_no_}}" "PACKAGE_CONTENT") string(REGEX MATCH "${EXPECTED_FILE_CONTENT_${file_no_}}" expected_content_list "${PACKAGE_CONTENT}") @@ -36,7 +36,7 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0) message(FATAL_ERROR "Found more than one file for file No. '${file_no_}'!" " Found files count '${foundFilesCount_}'." - " Files: '${foundFile_}'" + " Files: '${FOUND_FILE_${file_no_}}'" "${output_error_message}") endif() endforeach() -- cgit v0.12