diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-02-07 18:07:56 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-02-09 15:33:46 +0100 |
commit | ba48e1b80909d2394636eaabaca073fc9205fdec (patch) | |
tree | e9ceab5e0a7ad0117c72eac0afbb114cf2b0dfff /tests/auto/tools | |
parent | 1ff8877ea728bce3489168a1439b4e8bee781d39 (diff) |
Add missing implicit dependencies to the tool tests
moc, qmake, rcc, and uic tests execute corresponding tools inside
the test executables. This adds dependencies explicitly, to execute
tests using _check targets, without the need to manually build
dependencies.
Pick-to: 6.3 6.2
Fixes: QTBUG-98576
Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/moc/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/tools/qmake/CMakeLists.txt | 29 | ||||
-rw-r--r-- | tests/auto/tools/rcc/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/auto/tools/uic/CMakeLists.txt | 5 |
4 files changed, 34 insertions, 11 deletions
diff --git a/tests/auto/tools/moc/CMakeLists.txt b/tests/auto/tools/moc/CMakeLists.txt index 44c9ee3fa9..177615f25c 100644 --- a/tests/auto/tools/moc/CMakeLists.txt +++ b/tests/auto/tools/moc/CMakeLists.txt @@ -143,3 +143,9 @@ add_custom_command(TARGET tst_moc --collect-json "@${moc_json_out}" COMMENT "Running moc with --collect-json" ) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_moc + Qt::qtpaths + Qt::moc +) diff --git a/tests/auto/tools/qmake/CMakeLists.txt b/tests/auto/tools/qmake/CMakeLists.txt index a6aec5df5f..a115bd2ff2 100644 --- a/tests/auto/tools/qmake/CMakeLists.txt +++ b/tests/auto/tools/qmake/CMakeLists.txt @@ -1,9 +1,3 @@ -# Generated from qmake.pro. - -##################################################################### -## tst_qmake Test: -##################################################################### - # Collect test data file(GLOB_RECURSE test_data_glob RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} @@ -17,8 +11,21 @@ qt_internal_add_test(tst_qmake TESTDATA ${test_data} ) -## Scopes: -##################################################################### - -#### Keys ignored in scope 2:.:.:qmake.pro:WIN32: -# testcase.timeout = "900" +set(dependencies + Qt::moc + Qt::qmake +) +if(TARGET Qt::Gui) + list(APPEND dependencies Qt::Gui) +endif() +if(TARGET Qt::Widgets) + list(APPEND dependencies Qt::Widgets) +endif() +if(TARGET Qt::rcc) + list(APPEND dependencies Qt::rcc) +endif() +if(TARGET Qt::uic) + list(APPEND dependencies Qt::uic) +endif() +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_qmake ${dependencies}) diff --git a/tests/auto/tools/rcc/CMakeLists.txt b/tests/auto/tools/rcc/CMakeLists.txt index abcf3a1f60..703fdbe62b 100644 --- a/tests/auto/tools/rcc/CMakeLists.txt +++ b/tests/auto/tools/rcc/CMakeLists.txt @@ -63,3 +63,8 @@ qt_internal_add_resource(tst_rcc "size-1" FILES ${size-1_resource_files} ) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_rcc + Qt::rcc +) diff --git a/tests/auto/tools/uic/CMakeLists.txt b/tests/auto/tools/uic/CMakeLists.txt index 03af78a9c2..582d9a5518 100644 --- a/tests/auto/tools/uic/CMakeLists.txt +++ b/tests/auto/tools/uic/CMakeLists.txt @@ -8,3 +8,8 @@ qt_internal_add_test(tst_uic SOURCES tst_uic.cpp ) + +# Add dependencies that are implicitly used inside the test +add_dependencies(tst_uic + Qt::uic +) |