summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2020-05-19 09:44:05 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2020-05-19 09:47:19 (GMT)
commit8492ac1363c264a87532f7ee9890be5e22b57b82 (patch)
tree23a519a0626ce86ac90ee512197f9c4a483ea883
parentcc79253fa4966ee11d0a7a086b82f75b93a6c569 (diff)
downloadCMake-8492ac1363c264a87532f7ee9890be5e22b57b82.zip
CMake-8492ac1363c264a87532f7ee9890be5e22b57b82.tar.gz
CMake-8492ac1363c264a87532f7ee9890be5e22b57b82.tar.bz2
FindSquish: Remove settingsGroup argument
This argument never worked and was not passed on Windows, which is why the Windows version needs fewer fixups (and used to work independent of this change). On Linux (and macOS) it was passed and prevented the server from starting and the test would not be able to run. See also comments on https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4648
-rw-r--r--Modules/FindSquish.cmake9
-rwxr-xr-xModules/Squish4RunTestCase.bat3
-rwxr-xr-xModules/Squish4RunTestCase.sh9
-rw-r--r--Modules/SquishTestScript.cmake5
4 files changed, 10 insertions, 16 deletions
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index 16f5ab8..91d1410 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -65,8 +65,7 @@ The arguments have the following meaning:
the name of the squish test, i.e. the name of the subdirectory
of the test inside the suite directory.
``SETTINGSGROUP group``
- if specified, the given settings group will be used for executing the test.
- If not specified, the groupname will be "CTest_<username>"
+ deprecated, this argument will be ignored.
``PRE_COMMAND command``
if specified, the given command will be executed before starting the squish test.
``POST_COMMAND command``
@@ -83,7 +82,6 @@ The arguments have the following meaning:
AUT myApp
SUITE ${CMAKE_SOURCE_DIR}/tests/mySuite
TEST someSquishTest
- SETTINGSGROUP myGroup
)
endif ()
@@ -255,8 +253,8 @@ function(squish_v4_add_test testName)
message(FATAL_ERROR "Could not find squish testcase ${_SQUISH_TEST} (checked ${absTestCase})")
endif()
- if(NOT _SQUISH_SETTINGSGROUP)
- set(_SQUISH_SETTINGSGROUP "CTest_$ENV{LOGNAME}")
+ if(_SQUISH_SETTINGSGROUP)
+ message("SETTINGSGROUP is deprecated and will be ignored.")
endif()
add_test(NAME ${testName}
@@ -272,7 +270,6 @@ function(squish_v4_add_test testName)
"-Dsquish_env_vars:STRING=${envVars}"
"-Dsquish_wrapper:STRING=${testWraper}"
"-Dsquish_module_dir:STRING=${_SQUISH_MODULE_DIR}"
- "-Dsquish_settingsgroup:STRING=${_SQUISH_SETTINGSGROUP}"
"-Dsquish_pre_command:STRING=${_SQUISH_PRE_COMMAND}"
"-Dsquish_post_command:STRING=${_SQUISH_POST_COMMAND}"
-P "${_SQUISH_MODULE_DIR}/SquishTestScript.cmake"
diff --git a/Modules/Squish4RunTestCase.bat b/Modules/Squish4RunTestCase.bat
index 5bd815a..fe303b8 100755
--- a/Modules/Squish4RunTestCase.bat
+++ b/Modules/Squish4RunTestCase.bat
@@ -4,7 +4,6 @@ set TESTSUITE=%3
set TESTCASE=%4
set AUT=%5
set AUTDIR=%6
-set SETTINGSGROUP=%7
%SQUISHSERVER% --stop
@@ -14,7 +13,7 @@ echo "Adding AUT... %SQUISHSERVER% --config addAUT %AUT% %AUTDIR%"
echo "Starting the squish server... %SQUISHSERVER%"
start /B "Squish Server" %SQUISHSERVER%
-echo "Running the test case...%SQUISHRUNNER% --testsuite %TESTSUITE% --testcase %TESTCASE%"
+echo "Running the test case... %SQUISHRUNNER% --testsuite %TESTSUITE% --testcase %TESTCASE%"
%SQUISHRUNNER% --testsuite "%TESTSUITE%" --testcase "%TESTCASE%"
set returnValue=%ERRORLEVEL%
diff --git a/Modules/Squish4RunTestCase.sh b/Modules/Squish4RunTestCase.sh
index 39a3907..4d1e382 100755
--- a/Modules/Squish4RunTestCase.sh
+++ b/Modules/Squish4RunTestCase.sh
@@ -6,20 +6,19 @@ TESTSUITE=$3
TESTCASE=$4
AUT=$5
AUTDIR=$6
-SETTINGSGROUP=$7
$SQUISHSERVER --stop > /dev/null 2>&1
-echo "Adding AUT... $SQUISHSERVER --settingsGroup $SETTINGSGROUP --config addAUT $AUT $AUTDIR"
-$SQUISHSERVER --settingsGroup "$SETTINGSGROUP" --config addAUT "$AUT" "$AUTDIR" || exit 255
+echo "Adding AUT... $SQUISHSERVER --config addAUT $AUT $AUTDIR"
+$SQUISHSERVER --config addAUT "$AUT" "$AUTDIR" || exit 255
# sleep 1
echo "Starting the squish server... $SQUISHSERVER --daemon"
$SQUISHSERVER --daemon || exit 255
# sleep 2
-echo "Running the test case...$SQUISHRUNNER --settingsGroup $SETTINGSGROUP --testsuite $TESTSUITE --testcase $TESTCASE"
-$SQUISHRUNNER --settingsGroup "$SETTINGSGROUP" --testsuite "$TESTSUITE" --testcase "$TESTCASE"
+echo "Running the test case... $SQUISHRUNNER --testsuite $TESTSUITE --testcase $TESTCASE"
+$SQUISHRUNNER --testsuite "$TESTSUITE" --testcase "$TESTCASE"
returnValue=$?
echo "Stopping the squish server... $SQUISHSERVER --stop"
diff --git a/Modules/SquishTestScript.cmake b/Modules/SquishTestScript.cmake
index 2a80be5..b0cb4af 100644
--- a/Modules/SquishTestScript.cmake
+++ b/Modules/SquishTestScript.cmake
@@ -31,7 +31,6 @@ 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}'")
@@ -57,10 +56,10 @@ endif()
# run the test
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}
+ 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}
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}
+ 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}
RESULT_VARIABLE test_rv )
endif ()