SOURCES += ../tst_qapplication.cpp
TARGET = ../tst_qapplication
-wince* {
- additional.files = ../desktopsettingsaware/desktopsettingsaware.exe
- additional.path = desktopsettingsaware
- someTest.files = test.pro
- someTest.path = test
- DEPLOYMENT += additional deploy someTest
-}
-
win32 {
CONFIG(debug, debug|release) {
TARGET = ../../debug/tst_qapplication
}
mac*:CONFIG+=insignificant_test
+
+TESTDATA = ../test/test.pro ../tmp/README
+
+SUBPROGRAMS = desktopsettingsaware modal
+win32: !wince*: SUBPROGRAMS += wincmdline
+
+load(testcase) # for target.path and installTestHelperApp()
+for(file, SUBPROGRAMS): installTestHelperApp("../$${file}/$${file}",$${file},$${file})
+
+
{
{
#ifndef Q_OS_WINCE
- QString testDir = QDir::current().canonicalPath() + "/test";
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
#else
// On Windows CE we need QApplication object to have valid
// current Path. Therefore we need to identify it ourselves
"\nexpected:\n - " + expected.join("\n - ")));
// setting the library paths overrides everything
- QString testDir = QDir::currentPath() + "/test";
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
QApplication::setLibraryPaths(QStringList() << testDir);
QVERIFY2(isPathListIncluded(QApplication::libraryPaths(), (QStringList() << testDir)),
qPrintable("actual:\n - " + QApplication::libraryPaths().join("\n - ") +
qDebug() << "After adding plugins path:" << QApplication::libraryPaths();
#endif
QCOMPARE(QApplication::libraryPaths().count(), count);
-
- QApplication::addLibraryPath(QDir::currentPath() + "/test");
+ QString testDir = QFileInfo(QFINDTESTDATA("test/test.pro")).absolutePath();
+ QApplication::addLibraryPath(testDir);
QCOMPARE(QApplication::libraryPaths().count(), count + 1);
// creating QApplication adds the applicationDirPath to the libraryPath