911da982df
Mimicking the approach from testlib_defines.prf, DEFINES containing a path surrounded by quotation marks have to be handled differently for Visual Studio projects. Change-Id: I26f6a45d4df154f599e8be15b3aa3905cf703a1f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
20 lines
635 B
Plaintext
20 lines
635 B
Plaintext
!isEmpty(SOURCES) {
|
|
QT += qml qmltest
|
|
load(testcase)
|
|
contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
|
|
else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
|
|
} 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
|
|
}
|
|
|
|
# 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\"
|
|
}
|
|
|