2017-02-10 13:36:56 +00:00
|
|
|
!isEmpty(SOURCES) {
|
|
|
|
QT += qml qmltest
|
|
|
|
load(testcase)
|
2019-05-24 09:34:28 +00:00
|
|
|
!android {
|
|
|
|
contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
|
|
|
|
else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
|
|
|
|
} else {
|
2020-04-08 11:07:21 +00:00
|
|
|
isEmpty(RESOURCES) {
|
|
|
|
ANDROID_EXTRA_PLUGINS *= $$_PRO_FILE_PWD_
|
|
|
|
DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"assets:/$$basename(_PRO_FILE_PWD_)\")
|
|
|
|
} else {
|
|
|
|
DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\":/\")
|
|
|
|
}
|
2019-05-24 09:34:28 +00:00
|
|
|
}
|
|
|
|
|
2017-02-10 13:36:56 +00:00
|
|
|
} else {
|
|
|
|
# Allow a project to run tests without a CPP stub
|
|
|
|
TEMPLATE = aux
|
|
|
|
QMAKE_EXTRA_TARGETS += check
|
|
|
|
qtPrepareTool(QMAKE_QMLTESTRUNNER, qmltestrunner)
|
|
|
|
check.commands = $$QMAKE_QMLTESTRUNNER
|
|
|
|
}
|
2011-10-24 23:50:40 +00:00
|
|
|
|
2011-05-21 13:50:14 +00:00
|
|
|
# If the .pro file specified an IMPORTPATH, then add that to
|
|
|
|
# the command-line when the test is run.
|
|
|
|
!isEmpty(IMPORTPATH) {
|
|
|
|
for(import, IMPORTPATH): check.commands += -import \"$$import\"
|
|
|
|
}
|
2017-02-10 13:36:56 +00:00
|
|
|
|