Fix issues with Meson tests

- set temporary directory for launcher
- check for finding meson tool instead of crashing
- use GUILESS_MAIN since it doesn't use gui

Change-Id: I3f8de658d9ccbec3efb260cf2d58e27720e78d47
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Eike Ziller
2022-01-12 10:40:16 +01:00
parent d4b2f18c5e
commit 9091761996
4 changed files with 16 additions and 6 deletions

View File

@@ -27,6 +27,7 @@
#include <utils/launcherinterface.h>
#include <utils/singleton.h>
#include <utils/temporarydirectory.h>
#include <QCoreApplication>
#include <QDir>
@@ -50,6 +51,8 @@ class AMesonWrapper : public QObject
private slots:
void initTestCase()
{
Utils::TemporaryDirectory::setMasterTemporaryDirectory(QDir::tempPath()
+ "/mesontest-XXXXXX");
Utils::LauncherInterface::setPathToLauncher(qApp->applicationDirPath() + '/'
+ QLatin1String(TEST_RELATIVE_LIBEXEC_PATH));
}
@@ -120,5 +123,5 @@ private slots:
private:
};
QTEST_MAIN(AMesonWrapper)
QTEST_GUILESS_MAIN(AMesonWrapper)
#include "testmesonwrapper.moc"