summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qprocess_and_guieventloop
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other/qprocess_and_guieventloop')
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt12
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp8
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt9
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp2
4 files changed, 23 insertions, 8 deletions
diff --git a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
index 126feeeb2d..3383677009 100644
--- a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
+++ b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt
@@ -1,13 +1,21 @@
-# Generated from qprocess_and_guieventloop.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_qprocess_and_guieventloop Test:
#####################################################################
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qprocess_and_guieventloop LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_test(tst_qprocess_and_guieventloop
SOURCES
tst_qprocess_and_guieventloop.cpp
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
)
add_subdirectory(write-read-write)
+add_dependencies(tst_qprocess_and_guieventloop write-read-write)
diff --git a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
index e70d132ea7..b5b8c4cfc3 100644
--- a/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/tst_qprocess_and_guieventloop.cpp
@@ -1,6 +1,6 @@
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2016 Intel Corporation.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtGui/QGuiApplication>
#include <QTest>
@@ -35,20 +35,20 @@ void tst_QProcess_and_GuiEventLoop::waitForAndEventLoop()
qApp->processEvents(QEventLoop::AllEvents, 100);
// we mustn't have read anything in the event loop
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
// ensure the process hasn't died
QVERIFY(!process.waitForFinished(250));
// we mustn't have read anything during waitForFinished either
- QCOMPARE(spy.count(), 0);
+ QCOMPARE(spy.size(), 0);
// release the child for the second write
process.write("\n");
QVERIFY(process.waitForFinished(5000));
QCOMPARE(int(process.exitStatus()), int(QProcess::NormalExit));
QCOMPARE(process.exitCode(), 0);
- QCOMPARE(spy.count(), 1);
+ QCOMPARE(spy.size(), 1);
QCOMPARE(process.readAll().trimmed(), msg);
#endif
}
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
index b395ebf1a4..2bc1ebb7b0 100644
--- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/CMakeLists.txt
@@ -1,5 +1,12 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
#####################################################################
## write-read-write Binary:
#####################################################################
-add_executable(write-read-write main.cpp)
+qt_internal_add_executable(write-read-write
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+)
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
index b062542bb0..126c85dfd7 100644
--- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/main.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 Intel Corporation.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <stdio.h>