summaryrefslogtreecommitdiffstats
path: root/Modules/SquishTestScript.cmake
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-11-04 20:06:20 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-11-05 18:20:13 (GMT)
commit3a0ffa6225ec4b6f95dc691a91dec7f7e04cb7ec (patch)
treea795a5a9ac82f018f0aa619d05e6b935c3d95204 /Modules/SquishTestScript.cmake
parent2ae9d03fa64b49d708e489db0275f6893dfc05b4 (diff)
downloadCMake-3a0ffa6225ec4b6f95dc691a91dec7f7e04cb7ec.zip
CMake-3a0ffa6225ec4b6f95dc691a91dec7f7e04cb7ec.tar.gz
CMake-3a0ffa6225ec4b6f95dc691a91dec7f7e04cb7ec.tar.bz2
Squish: add support for squish 4 (#9734)
This patch adds support for Squish 4.x. The changes are basically what is attached to http://public.kitware.com/Bug/view.php?id=9734. When adding a test for squish 4.x, use squish_v4_add_test(). Alex
Diffstat (limited to 'Modules/SquishTestScript.cmake')
-rw-r--r--Modules/SquishTestScript.cmake52
1 files changed, 35 insertions, 17 deletions
diff --git a/Modules/SquishTestScript.cmake b/Modules/SquishTestScript.cmake
index d565305..f794b3e 100644
--- a/Modules/SquishTestScript.cmake
+++ b/Modules/SquishTestScript.cmake
@@ -22,17 +22,22 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
-
# print out the variable that we are using
message(STATUS "squish_aut='${squish_aut}'")
+message(STATUS "squish_aut_dir='${squish_aut_dir}'")
+message(STATUS "squish_version='${squish_version}'")
message(STATUS "squish_server_executable='${squish_server_executable}'")
message(STATUS "squish_client_executable='${squish_client_executable}'")
message(STATUS "squish_libqtdir ='${squish_libqtdir}'")
+message(STATUS "squish_test_suite='${squish_test_suite}'")
message(STATUS "squish_test_case='${squish_test_case}'")
message(STATUS "squish_wrapper='${squish_wrapper}'")
message(STATUS "squish_env_vars='${squish_env_vars}'")
+message(STATUS "squish_module_dir='${squish_module_dir}'")
+message(STATUS "squish_settingsgroup='${squish_settingsgroup}'")
+message(STATUS "squish_pre_command='${squish_pre_command}'")
+message(STATUS "squish_post_command='${squish_post_command}'")
# parse enviornment variables
foreach(i ${squish_env_vars})
@@ -48,25 +53,38 @@ if (QT4_INSTALLED)
set ( ENV{${SQUISH_LIBQTDIR}} ${squish_libqtdir} )
endif ()
+if(squish_pre_command)
+ message(STATUS "Executing pre command: ${squish_pre_command}")
+ execute_process(COMMAND "${squish_pre_command}")
+endif()
+
# run the test
-if (WIN32)
- execute_process(
- COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
- RESULT_VARIABLE test_rv
- )
-endif ()
+if("${squish_version}" STREQUAL "4")
+ if (WIN32)
+ execute_process(COMMAND ${squish_module_dir}/Squish4RunTestCase.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_suite} ${squish_test_case} ${squish_aut} ${squish_aut_dir} ${squish_settingsgroup}
+ RESULT_VARIABLE test_rv )
+ elseif(UNIX)
+ execute_process(COMMAND ${squish_module_dir}/Squish4RunTestCase.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_suite} ${squish_test_case} ${squish_aut} ${squish_aut_dir} ${squish_settingsgroup}
+ RESULT_VARIABLE test_rv )
+ endif ()
-if (UNIX)
- execute_process(
- COMMAND ${CMAKE_ROOT}/Modules/SquishRunTestCase.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
- RESULT_VARIABLE test_rv
- )
-endif ()
+else()
+
+ if (WIN32)
+ execute_process(COMMAND ${squish_module_dir}/SquishRunTestCase.bat ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
+ RESULT_VARIABLE test_rv )
+ elseif(UNIX)
+ execute_process(COMMAND ${squish_module_dir}/SquishRunTestCase.sh ${squish_server_executable} ${squish_client_executable} ${squish_test_case} ${squish_wrapper} ${squish_aut}
+ RESULT_VARIABLE test_rv )
+ endif ()
+endif()
+
+if(squish_post_command)
+ message(STATUS "Executing post command: ${squish_post_command}")
+ execute_process(COMMAND "${squish_post_command}")
+endif()
# check for an error with running the test
if(NOT "${test_rv}" STREQUAL "0")
message(FATAL_ERROR "Error running Squish test")
endif()
-
-
-