diff options
Diffstat (limited to 'tests/auto/corelib/plugin/qlibrary/tst')
-rw-r--r-- | tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt | 37 | ||||
-rw-r--r-- | tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt | 44 | ||||
-rw-r--r-- | tests/auto/corelib/plugin/qlibrary/tst/tst.pro | 25 |
3 files changed, 11 insertions, 95 deletions
diff --git a/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt deleted file mode 100644 index c3af98df13..0000000000 --- a/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -# Generated from tst.pro. - -##################################################################### -## tst_qlibrary Test: -##################################################################### - -# Collect test data -list(APPEND test_data "../library_path/invalid.so") - -qt_add_test(tst_qlibrary - OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" - SOURCES - ../tst_qlibrary.cpp - TESTDATA ${test_data} -) - -## Scopes: -##################################################################### - -if(ANDROID) - # Resources: - set(qmake_libs_resource_files - ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.prl - ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so - ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2 - ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so - ) - - qt_add_resource(tst_qlibrary "qmake_libs" - PREFIX - "android_test_data" - BASE - "${CMAKE_CURRENT_BINARY_DIR}/.." - FILES - ${qmake_libs_resource_files} - ) -endif() diff --git a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt index a99b96c806..fc452f37f5 100644 --- a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt +++ b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt @@ -1,4 +1,5 @@ -# Generated from tst.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause ##################################################################### ## tst_qlibrary Test: @@ -7,44 +8,21 @@ # Collect test data list(APPEND test_data "../library_path/invalid.so") -qt_add_test(tst_qlibrary +qt_internal_add_test(tst_qlibrary OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" SOURCES ../tst_qlibrary.cpp TESTDATA ${test_data} + LIBRARIES mylib mylib2 ) -## Scopes: -##################################################################### +add_dependencies(tst_qlibrary mylib mylib2) if(ANDROID) - # special case begin - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so - PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib - ) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2 - ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so - PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib2 - ) - # special case end - # Resources: - set(qmake_libs_resource_files - # special case begin - #libmylib.prl - libmylib.so - libmylib.so2 - system.qt.test.mylib.so - # special case end - ) - - qt_add_resource(tst_qlibrary "qmake_libs" - PREFIX - "android_test_data" - BASE - "${CMAKE_CURRENT_BINARY_DIR}/.." - FILES - ${qmake_libs_resource_files} - ) + list(APPEND extra_libs + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so") + list(APPEND extra_libs + "${CMAKE_CURRENT_BINARY_DIR}/../libsystem.qt.test.mylib.so") + set_target_properties(tst_qlibrary PROPERTIES + QT_ANDROID_EXTRA_LIBS "${extra_libs}") endif() diff --git a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro b/tests/auto/corelib/plugin/qlibrary/tst/tst.pro deleted file mode 100644 index 5894bee9d5..0000000000 --- a/tests/auto/corelib/plugin/qlibrary/tst/tst.pro +++ /dev/null @@ -1,25 +0,0 @@ -CONFIG += testcase -TARGET = ../tst_qlibrary -QT = core testlib -SOURCES = ../tst_qlibrary.cpp - -win32:debug_and_release { - CONFIG(debug, debug|release) { - TARGET = ../../debug/tst_qlibrary - } else { - TARGET = ../../release/tst_qlibrary - } -} - -TESTDATA += ../library_path/invalid.so - -android { - libs.prefix = android_test_data - libs.base = $$OUT_PWD/.. - libs.files += $$OUT_PWD/../libmylib.so \ - $$OUT_PWD/../libmylib.so2 \ - $$OUT_PWD/../libmylib.prl \ - $$OUT_PWD/../system.qt.test.mylib.so - - RESOURCES += libs -} |