Tests: Run CFBundleTest only with valid configuration

The verification script needs to know the configuration tested.
This commit is contained in:
Brad King 2014-12-17 11:42:19 -05:00
parent 3a605693a5
commit b189c5994d
2 changed files with 6 additions and 8 deletions

View File

@ -14,13 +14,10 @@ message(STATUS "CTEST_CONFIGURATION_TYPE='${CTEST_CONFIGURATION_TYPE}'")
message(STATUS "dir='${dir}'") message(STATUS "dir='${dir}'")
message(STATUS "gen='${gen}'") message(STATUS "gen='${gen}'")
if(gen MATCHES "Make" OR if(gen STREQUAL "Xcode")
"${CTEST_CONFIGURATION_TYPE}" STREQUAL "" OR
"${CTEST_CONFIGURATION_TYPE}" STREQUAL "." OR
"${CTEST_CONFIGURATION_TYPE}" STREQUAL "NoConfig")
set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
else()
set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest") set(expected_filename "${dir}/${CTEST_CONFIGURATION_TYPE}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
else()
set(expected_filename "${dir}/CFBundleTest.plugin/Contents/MacOS/CFBundleTest")
endif() endif()
if(NOT EXISTS "${expected_filename}") if(NOT EXISTS "${expected_filename}")

View File

@ -1935,16 +1935,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe) ${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest") list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
add_test(CFBundleTest ${CMAKE_CTEST_COMMAND} add_test(NAME CFBundleTest COMMAND ${CMAKE_CTEST_COMMAND}
--build-and-test --build-and-test
"${CMake_SOURCE_DIR}/Tests/CFBundleTest" "${CMake_SOURCE_DIR}/Tests/CFBundleTest"
"${CMake_BINARY_DIR}/Tests/CFBundleTest" "${CMake_BINARY_DIR}/Tests/CFBundleTest"
--build-two-config --build-two-config
${build_generator_args} ${build_generator_args}
--build-project CFBundleTest --build-project CFBundleTest
--build-config $<CONFIGURATION>
--build-options ${build_options} --build-options ${build_options}
--test-command --test-command
${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=$<CONFIGURATION>
-Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
-Dgen=${CMAKE_GENERATOR} -Dgen=${CMAKE_GENERATOR}
-P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)