summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2024-02-25 16:42:19 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-02-26 05:38:09 +0000
commit9b301e6edff02ac070594082bbd1cdc576bb37c5 (patch)
tree1e10206b51ba78aa7531d3902314803859ef83e0
parent4942ea633b40809f285e6bbc45d0692207aa7686 (diff)
CMake: Fix flakiness of test_translation_api
We're missing a dependency from some *_lrelease targets to the update_translations targets. The result is lrelease reading an incomplete .ts file that's just about to be written by lupdate. This commit amends 94bb328a17bc01d28ecb6464744cf7ef89c4055a. Said commit changed the *_lrelease targets to end with a number if qt_add_lrelease was called multiple times. Take this into account in the code that sets up dependencies to the 'update_translations' target. Task-number: QTBUG-116599 Change-Id: Ie297867c49fd533db266bb51ae6cb30bddf2085e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 58a822ba37fa1cf2e6e719b2a8b4a1e4669c9265) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/cmake/linguist/test_translation_api/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/cmake/linguist/test_translation_api/CMakeLists.txt b/tests/auto/cmake/linguist/test_translation_api/CMakeLists.txt
index 07ebc5d0d..eba07ef0a 100644
--- a/tests/auto/cmake/linguist/test_translation_api/CMakeLists.txt
+++ b/tests/auto/cmake/linguist/test_translation_api/CMakeLists.txt
@@ -150,7 +150,7 @@ qt6_add_translations(app7
# Build 'update_translations' before any of the '*_lrelease' targets.
get_directory_property(lrelease_targets BUILDSYSTEM_TARGETS)
-list(FILTER lrelease_targets INCLUDE REGEX "_lrelease$")
+list(FILTER lrelease_targets INCLUDE REGEX "_lrelease[0-9]*$")
foreach(target IN LISTS lrelease_targets)
add_dependencies(${target} update_translations)
endforeach()