include(../../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
SOURCES += tst_parserstress.cpp
-DEFINES += SRCDIR=\\\"$$PWD\\\"
-DEFINES += TESTDATADIR=\\\"$$PWD/tests\\\"
+TESTDATA = tests/*
CONFIG += parallel_test
void tst_parserstress::ecmascript_data()
{
-#ifdef TESTDATADIR
- QDir dir(TESTDATADIR);
+ QString testDataDir = QFileInfo(QFINDTESTDATA("tests/shell.js")).absolutePath();
+ QVERIFY2(!testDataDir.isEmpty(), qPrintable("Cannot find testDataDir!"));
+
+ QDir dir(testDataDir);
QStringList files = findJSFiles(dir);
QTest::addColumn<QString>("file");
foreach (const QString &file, files) {
QTest::newRow(qPrintable(file)) << file;
}
-#endif
}
void tst_parserstress::ecmascript()
QByteArray qmlData = qml.toUtf8();
QQmlComponent component(&engine);
-
- component.setData(qmlData, QUrl::fromLocalFile(SRCDIR + QString("/dummy.qml")));
+
+ QString dummyFile = QFINDTESTDATA("dummy.qml");
+ component.setData(qmlData, QUrl::fromLocalFile(dummyFile));
QFileInfo info(file);
QT += qml widgets testlib
macx:CONFIG -= app_bundle
SOURCES += tst_qjsengine.cpp
-wince* {
- addFiles.files = script
- addFiles.path = .
- DEPLOYMENT += addFiles
- DEFINES += SRCDIR=\\\"./\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD\\\"
-}
+
+TESTDATA = script/*
qmlplugindump \
qqmlcomponent \
qqmlconsole \
- qqmlcontext \
qqmlengine \
qqmlerror \
qqmlincubator \
animation \
qqmlcpputils \
qqmlecmascript \
+ qqmlcontext \
qqmlexpression \
qqmlimageprovider \
qqmlinstruction \
DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test
+
+cross_compile: DEFINES += QTEST_CROSS_COMPILED
{
QFETCH(QString, file);
+#if defined(QTEST_CROSS_COMPILED)
+ QSKIP("sources not available when cross compiled");
+#endif
+
QProcess qmlminify;
qmlminify.start(qmlminPath, QStringList() << QLatin1String("--verify-only") << file);
qmlminify.waitForFinished();
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
macx:CONFIG -= app_bundle
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
macx:CONFIG -= app_bundle
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
# QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage
# LIBS += -lgcov
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private network widgets testlib
CONFIG += parallel_test
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
QT += core-private gui-private qml-private testlib
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
QT += core-private gui-private qml-private widgets testlib
HEADERS += ../../shared/testhttpserver.h
SOURCES += ../../shared/testhttpserver.cpp
-importFiles.files = data
-importFiles.path = .
-DEPLOYMENT += importFiles
+TESTDATA = data/*
CONFIG += parallel_test
QT += core-private gui-private v8-private qml-private network testlib
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
QT += qml testlib
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
-
-testImportFiles.files = imports
-testImportFiles.path = .
-DEPLOYMENT += testImportFiles
+TESTDATA = data/* imports/*
QT += core-private gui-private qml-private network testlib
DEFINES += SRCDIR=\\\"$$PWD\\\"
CONFIG += parallel_test
+
+cross_compile: DEFINES += QTEST_CROSS_COMPILED
{
QFETCH(QString, file);
+#if defined(QTEST_CROSS_COMPILED)
+ QSKIP("sources not available when cross compiled");
+#endif
+
using namespace QQmlJS;
QString code;
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
macx:CONFIG -= app_bundle
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
CONFIG += parallel_test
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
QT += core-private gui-private v8-private qml-private quick-private sql testlib
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
QT += core-private gui-private qml-private testlib
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test
include (../../shared/util.pri)
-testDataFiles.files = data
-testDataFiles.path = .
-DEPLOYMENT += testDataFiles
+TESTDATA = data/*
CONFIG += parallel_test