CMake: Make qtgrpc tests standalone projects

Add the boilerplate standalone test prelude to each test, so that they
can be opened with an IDE without the qt-cmake-standalone-test script,
but directly with qt-cmake or cmake.

Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor

Manual adjustments were made where the code was inserted in the wrong
location.

Adapt the grpc client tests manually to make them work in standalone
variant. Also some projects are renamed manually since their
subdirectories contain more than one test target, so the target
name doesn't reflect the project scope.

Task-number: QTBUG-93020
Change-Id: Ifa68664073c5947f28db0a67bab25521d4f9a523
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Alexandru Croitor 2023-07-03 20:39:54 +02:00 committed by Alexey Edelev
parent e9f6546483
commit e66b3ac4c8
32 changed files with 197 additions and 9 deletions

View File

@ -1,6 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_grpc_client LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
include("../shared/test_server/CMakeLists.txt")
endif()
if(NOT TARGET testserver) if(NOT TARGET testserver)
return() return()
endif() endif()
@ -24,6 +32,8 @@ qt_internal_add_test(tst_grpc_client
tst_grpc_client.cpp tst_grpc_client.cpp
INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/../shared ${CMAKE_CURRENT_SOURCE_DIR}/../shared
DEFINES
TEST_GRPC_SERVER_PATH="$<TARGET_FILE:testserver>"
LIBRARIES LIBRARIES
Qt::Test Qt::Test
Qt::Core Qt::Core

View File

@ -26,6 +26,7 @@
# include <grpcpp/security/credentials.h> # include <grpcpp/security/credentials.h>
#endif #endif
#include "testservice_client.grpc.qpb.h" #include "testservice_client.grpc.qpb.h"
#include <message_latency_defs.h>
using namespace Qt::Literals::StringLiterals; using namespace Qt::Literals::StringLiterals;
@ -156,7 +157,7 @@ private:
void startServer() void startServer()
{ {
serverProc = std::make_unique<QProcess>(); serverProc = std::make_unique<QProcess>();
QString serverPath = QFINDTESTDATA("../shared/test_server/testserver"); QString serverPath = QFINDTESTDATA(TEST_GRPC_SERVER_PATH);
QVERIFY2(!serverPath.isEmpty(), "testserver binary is missing"); QVERIFY2(!serverPath.isEmpty(), "testserver binary is missing");
QObject::connect(serverProc.get(), &QProcess::readyReadStandardOutput, this, QObject::connect(serverProc.get(), &QProcess::readyReadStandardOutput, this,
[this] { qInfo() << serverProc->readAllStandardOutput(); }); [this] { qInfo() << serverProc->readAllStandardOutput(); });

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_grpc_server LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_grpc_server_qtgrpc_gen qt6_add_protobuf(tst_grpc_server_qtgrpc_gen
PROTO_FILES PROTO_FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/proto/testservice.proto ${CMAKE_CURRENT_SOURCE_DIR}/../shared/proto/testservice.proto

View File

@ -0,0 +1,6 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QT_GRPC_TEST_MESSAGE_LATENCY
# define QT_GRPC_TEST_MESSAGE_LATENCY 300
#endif

View File

@ -50,11 +50,15 @@ target_link_libraries(TestServerRunner_grpc_gen
add_library(TestServerRunner add_library(TestServerRunner
STATIC STATIC
testserverrunner.cpp ${CMAKE_CURRENT_LIST_DIR}/testserverrunner.cpp
testserverrunner.h ${CMAKE_CURRENT_LIST_DIR}/testserverrunner.h
) )
target_include_directories(TestServerRunner PRIVATE ${out_dir}) target_include_directories(TestServerRunner
PRIVATE
${out_dir}
${CMAKE_CURRENT_LIST_DIR}/..
)
target_link_libraries(TestServerRunner target_link_libraries(TestServerRunner
PRIVATE PRIVATE
@ -63,18 +67,23 @@ target_link_libraries(TestServerRunner
Qt6::Core Qt6::Core
) )
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/assets/cert.pem"
PROPERTIES QT_RESOURCE_ALIAS assets/cert.pem)
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/assets/key.pem"
PROPERTIES QT_RESOURCE_ALIAS assets/key.pem)
qt_add_resources(TestServerRunner qt_add_resources(TestServerRunner
"keys" "keys"
PREFIX PREFIX
"/" "/"
FILES FILES
"assets/cert.pem" "${CMAKE_CURRENT_LIST_DIR}/assets/cert.pem"
"assets/key.pem" "${CMAKE_CURRENT_LIST_DIR}/assets/key.pem"
) )
qt_internal_add_executable(testserver qt_internal_add_executable(testserver
SOURCES SOURCES
testserver.cpp ${CMAKE_CURRENT_LIST_DIR}/testserver.cpp
LIBRARIES LIBRARIES
TestServerRunner TestServerRunner
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
@ -83,7 +92,7 @@ qt_internal_add_executable(testserver
qt_internal_add_executable(securetestserver qt_internal_add_executable(securetestserver
SOURCES SOURCES
securetestserver.cpp ${CMAKE_CURRENT_LIST_DIR}/securetestserver.cpp
LIBRARIES LIBRARIES
TestServerRunner TestServerRunner
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"

View File

@ -8,6 +8,8 @@
#include <QString> #include <QString>
#include "testservice.grpc.pb.h" #include "testservice.grpc.pb.h"
#include <message_latency_defs.h>
#include <grpc++/grpc++.h> #include <grpc++/grpc++.h>
#include <memory> #include <memory>

View File

@ -1,6 +1,14 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_grpc_ssl_client LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
include("../shared/test_server/CMakeLists.txt")
endif()
if(NOT TARGET securetestserver) if(NOT TARGET securetestserver)
return() return()
endif() endif()
@ -25,6 +33,8 @@ qt_internal_add_test(tst_grpc_ssl_client
tst_grpc_ssl_client.cpp tst_grpc_ssl_client.cpp
INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/../shared ${CMAKE_CURRENT_SOURCE_DIR}/../shared
DEFINES
TEST_GRPC_SERVER_PATH="$<TARGET_FILE:securetestserver>"
LIBRARIES LIBRARIES
Qt::Test Qt::Test
Qt::Core Qt::Core

View File

@ -68,7 +68,7 @@ private:
void startServer() void startServer()
{ {
serverProc = std::make_unique<QProcess>(); serverProc = std::make_unique<QProcess>();
QString serverPath = QFINDTESTDATA("../shared/test_server/securetestserver"); QString serverPath = QFINDTESTDATA(TEST_GRPC_SERVER_PATH);
QVERIFY2(!serverPath.isEmpty(), "securetestserver binary is missing"); QVERIFY2(!serverPath.isEmpty(), "securetestserver binary is missing");
serverProc->start(serverPath); serverProc->start(serverPath);
serverProc->waitForStarted(); serverProc->waitForStarted();

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_grpc_unattached_channel LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_grpc_unattached_channel_qtgrpc_gen qt6_add_protobuf(tst_grpc_unattached_channel_qtgrpc_gen
PROTO_FILES PROTO_FILES
${CMAKE_CURRENT_SOURCE_DIR}/../shared/proto/testservice.proto ${CMAKE_CURRENT_SOURCE_DIR}/../shared/proto/testservice.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qtgrpcgen LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_qtgrpcgen qt_internal_add_test(tst_qtgrpcgen
SOURCES SOURCES
tst_qtgrpcgen.cpp tst_qtgrpcgen.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_basic LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_basictypes_gen qt6_add_protobuf(tst_protobuf_basictypes_gen
PROTO_FILES PROTO_FILES
proto/basicmessages.proto proto/basicmessages.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_converters LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_converter qt_internal_add_test(tst_protobuf_converter
SOURCES SOURCES
tst_protobuf_converter.cpp tst_protobuf_converter.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_duplicated_metatypes LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_duplicatedmetatypes qt_internal_add_test(tst_protobuf_duplicatedmetatypes
SOURCES SOURCES
tst_protobuf_duplicatedmetatypes.cpp tst_protobuf_duplicatedmetatypes.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_enums LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_enumtypes_gen qt6_add_protobuf(tst_protobuf_enumtypes_gen
PROTO_FILES PROTO_FILES
enummessages.proto enummessages.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_externalpackage LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_externalpackage qt_internal_add_test(tst_protobuf_externalpackage
SOURCES SOURCES
tst_protobuf_externalpackage.cpp tst_protobuf_externalpackage.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_extranamespace LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_extranamespace_qtprotobuf_gen qt6_add_protobuf(tst_protobuf_extranamespace_qtprotobuf_gen
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/qt_protobuf_generated" OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/qt_protobuf_generated"
PROTO_FILES proto/extranamespace.proto PROTO_FILES proto/extranamespace.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_nested LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_nestedtypes_qtprotobuf_gen qt6_add_protobuf(tst_protobuf_nestedtypes_qtprotobuf_gen
PROTO_FILES PROTO_FILES
proto/nestedmessages.proto proto/nestedmessages.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_nopackage LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_nopackagetypes_qtprotobuf_gen qt6_add_protobuf(tst_protobuf_nopackagetypes_qtprotobuf_gen
PROTO_FILES PROTO_FILES
../../shared/data/proto/nopackage.proto ../../shared/data/proto/nopackage.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qprotobuflazymessagepointer LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_qprotobuflazymessagepointer qt_internal_add_test(tst_qprotobuflazymessagepointer
SOURCES SOURCES
tst_qprotobuflazymessagepointer.cpp tst_qprotobuflazymessagepointer.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qprotobufoneof LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_qprotobufoneof qt_internal_add_test(tst_qprotobufoneof
SOURCES SOURCES
tst_qprotobufoneof.cpp tst_qprotobufoneof.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_recursive LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_recursive_gen qt6_add_protobuf(tst_protobuf_recursive_gen
PROTO_FILES PROTO_FILES
recursive.proto recursive.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_sequence LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_sequence qt_internal_add_test(tst_protobuf_sequence
SOURCES SOURCES
tst_protobuf_sequence.cpp tst_protobuf_sequence.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_syntax LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt6_add_protobuf(tst_protobuf_syntax_qtprotobuf_gen qt6_add_protobuf(tst_protobuf_syntax_qtprotobuf_gen
PROTO_FILES PROTO_FILES
../../shared/data/proto/syntax.proto ../../shared/data/proto/syntax.proto

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_wellknown LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_any qt_internal_add_test(tst_protobuf_any
SOURCES SOURCES
tst_protobuf_any.cpp tst_protobuf_any.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_qtprotobufgen LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_qtprotobufgen qt_internal_add_test(tst_qtprotobufgen
SOURCES SOURCES
tst_qtprotobufgen.cpp tst_qtprotobufgen.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_basic_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_basictypes_qml qt_internal_add_test(tst_protobuf_basictypes_qml
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_enums_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_enumtypes_qml qt_internal_add_test(tst_protobuf_enumtypes_qml
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_messagelists_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_repeated_qml qt_internal_add_test(tst_protobuf_repeated_qml
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_nested_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_nestedtypes_qtprotobuf_qmltest qt_internal_add_test(tst_nestedtypes_qtprotobuf_qmltest
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_nopackage_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_nopackage_qml qt_internal_add_test(tst_protobuf_nopackage_qml
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2023 The Qt Company Ltd. # Copyright (C) 2023 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_syntax_qml LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_syntax_qml qt_internal_add_test(tst_protobuf_syntax_qml
QMLTEST QMLTEST
SOURCES SOURCES

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd. # Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_protobuf_protobufqttypes LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_protobuf_qtcoretypes qt_internal_add_test(tst_protobuf_qtcoretypes
SOURCES SOURCES
qtprotobufqttypescoretest.cpp qtprotobufqttypescoretest.cpp