summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2024-03-02 22:22:48 +0100
committerRobert Griebl <robert.griebl@qt.io>2024-03-05 12:30:26 +0100
commit607b74cfea26d45285c36314592927e03c9dfeff (patch)
treeb14e7769d20d0b372e66685e46c359c38c7212da
parent8baaee2969f17324de6611ff01520f28541bd47a (diff)
tests: cleanup
Change-Id: I4b2151d4586c1b2fd0e75b901c4aaeed310abbe9 Pick-to: 6.7 Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r--tests/auto/configuration/tst_configuration.cpp2
-rw-r--r--tests/auto/controller-tool/tst_controller-tool.cpp9
-rw-r--r--tests/auto/packagecreator/tst_packagecreator.cpp9
-rw-r--r--tests/auto/packageextractor/tst_packageextractor.cpp9
-rw-r--r--tests/auto/runtime/tst_runtime.cpp2
-rw-r--r--tests/auto/yaml/tst_yaml.cpp2
6 files changed, 5 insertions, 28 deletions
diff --git a/tests/auto/configuration/tst_configuration.cpp b/tests/auto/configuration/tst_configuration.cpp
index 45e4fa36..82793d0a 100644
--- a/tests/auto/configuration/tst_configuration.cpp
+++ b/tests/auto/configuration/tst_configuration.cpp
@@ -517,6 +517,6 @@ void tst_Configuration::commandLineConfig()
}
-QTEST_MAIN(tst_Configuration)
+QTEST_GUILESS_MAIN(tst_Configuration)
#include "tst_configuration.moc"
diff --git a/tests/auto/controller-tool/tst_controller-tool.cpp b/tests/auto/controller-tool/tst_controller-tool.cpp
index 45cece4f..346a521a 100644
--- a/tests/auto/controller-tool/tst_controller-tool.cpp
+++ b/tests/auto/controller-tool/tst_controller-tool.cpp
@@ -55,7 +55,6 @@ private:
Main *m_main = nullptr;
Configuration *m_config = nullptr;
bool m_mainSetupDone = false;
- QDir m_tmpDir;
};
@@ -153,7 +152,6 @@ QString ControllerTool::s_command;
tst_ControllerTool::tst_ControllerTool()
: m_spyTimeout(5000 * timeoutFactor())
- , m_tmpDir(u"/tmp/am-test-controller-tool"_s)
{ }
void tst_ControllerTool::initTestCase()
@@ -207,10 +205,6 @@ void tst_ControllerTool::initTestCase()
QVERIFY2(false, e.what());
}
PackageManager::instance()->setAllowInstallationOfUnsignedPackages(true);
-
- if (m_tmpDir.exists())
- m_tmpDir.removeRecursively();
- QVERIFY(m_tmpDir.mkpath(u"."_s));
}
void tst_ControllerTool::cleanupTestCase()
@@ -230,9 +224,6 @@ void tst_ControllerTool::cleanupTestCase()
delete [] m_argv[i];
delete [] m_argv;
}
-
- if (m_tmpDir.exists())
- m_tmpDir.removeRecursively();
}
void tst_ControllerTool::usage()
diff --git a/tests/auto/packagecreator/tst_packagecreator.cpp b/tests/auto/packagecreator/tst_packagecreator.cpp
index fe9459fa..1d2fd043 100644
--- a/tests/auto/packagecreator/tst_packagecreator.cpp
+++ b/tests/auto/packagecreator/tst_packagecreator.cpp
@@ -150,13 +150,6 @@ QString tst_PackageCreator::escapeFilename(const QString &name)
}
}
-int main(int argc, char *argv[])
-{
- QCoreApplication app(argc, argv);
- app.setAttribute(Qt::AA_Use96Dpi, true);
- tst_PackageCreator tc;
- QTEST_SET_MAIN_SOURCE_PATH
- return QTest::qExec(&tc, argc, argv);
-}
+QTEST_GUILESS_MAIN(tst_PackageCreator)
#include "tst_packagecreator.moc"
diff --git a/tests/auto/packageextractor/tst_packageextractor.cpp b/tests/auto/packageextractor/tst_packageextractor.cpp
index fdfe38c3..6aba41ec 100644
--- a/tests/auto/packageextractor/tst_packageextractor.cpp
+++ b/tests/auto/packageextractor/tst_packageextractor.cpp
@@ -281,13 +281,6 @@ void tst_PackageExtractor::extractFromFifo()
QTRY_VERIFY_WITH_TIMEOUT(fifo.isFinished(), 5000 * timeoutFactor());
}
-int main(int argc, char *argv[])
-{
- QCoreApplication app(argc, argv);
- app.setAttribute(Qt::AA_Use96Dpi, true);
- tst_PackageExtractor tc;
- QTEST_SET_MAIN_SOURCE_PATH
- return QTest::qExec(&tc, argc, argv);
-}
+QTEST_GUILESS_MAIN(tst_PackageExtractor)
#include "tst_packageextractor.moc"
diff --git a/tests/auto/runtime/tst_runtime.cpp b/tests/auto/runtime/tst_runtime.cpp
index 839cfb78..8bc7dc21 100644
--- a/tests/auto/runtime/tst_runtime.cpp
+++ b/tests/auto/runtime/tst_runtime.cpp
@@ -149,6 +149,6 @@ void tst_Runtime::factory()
QVERIFY(!r->securityToken().isEmpty());
}
-QTEST_MAIN(tst_Runtime)
+QTEST_GUILESS_MAIN(tst_Runtime)
#include "tst_runtime.moc"
diff --git a/tests/auto/yaml/tst_yaml.cpp b/tests/auto/yaml/tst_yaml.cpp
index ae5e2cdb..f43a5edc 100644
--- a/tests/auto/yaml/tst_yaml.cpp
+++ b/tests/auto/yaml/tst_yaml.cpp
@@ -429,6 +429,6 @@ void tst_Yaml::parallel()
QCOMPARE(success.loadAcquire(), threadCount);
}
-QTEST_MAIN(tst_Yaml)
+QTEST_GUILESS_MAIN(tst_Yaml)
#include "tst_yaml.moc"