forked from qt-creator/qt-creator
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user