CMake: Remove deployment file check in android test runner args query

The QT_ANDROID_DEPLOYMENT_SETTINGS_FILE was originally queried and
checked as part of the following commit
080f9ad160ef7422b2bab884c7ccc950d35b3a0a
because it was meant to be passed to the test runner executable.

The deployment file argument stopped being passed to the test runner
as part of 29b17fa335388c9b93f70c29b2398cf2fee65785 whereas the
check was left in the code.

This check causes problems when trying to allow running deferred
android finalizers for tests, because the deployment file is set only
in the finalizer, but the check for the deployment file existence is
done earlier when trying to get the test runner arguments.

Remove the query and the check for QT_ANDROID_DEPLOYMENT_SETTINGS_FILE
because they prevent the above use case, and also don't serve any
purpose in the given function scope.

Pick-to: 6.8
Task-number: QTBUG-93625
Task-number: QTBUG-112212
Change-Id: I6e620e452359c94cc7896a98ac5872221f6bb9a2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Alexandru Croitor 2024-10-23 17:19:00 +02:00
parent 2bbc0bda30
commit 412e08106c

View File

@ -191,11 +191,6 @@ function(qt_internal_android_test_runner_arguments target out_test_runner out_te
set(${out_test_runner} "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}/androidtestrunner" PARENT_SCOPE)
set(deployment_tool "${QT_HOST_PATH}/${QT${PROJECT_VERSION_MAJOR}_HOST_INFO_BINDIR}/androiddeployqt")
get_target_property(deployment_file ${target} QT_ANDROID_DEPLOYMENT_SETTINGS_FILE)
if (NOT deployment_file)
message(FATAL_ERROR "Target ${target} is not a valid android executable target\n")
endif()
qt_internal_android_get_target_android_build_dir(${target} android_build_dir)
set(${out_test_arguments}
"--path" "${android_build_dir}"