mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
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
This commit is contained in:
@@ -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"
|
||||
|
@@ -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%
|
||||
|
||||
|
@@ -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"
|
||||
|
@@ -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 ()
|
||||
|
||||
|
Reference in New Issue
Block a user