automatically put TESTDATA into RESOURCES on android/ios/winrt
QFINDTESTDATA is already prepared to find it there. Change-Id: I467392786ce6bcfbf1bd0b6079f60c9df06834b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>bb10
parent
4a318a6182
commit
604ef6d4a7
|
|
@ -55,6 +55,9 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
|
|||
cross_compile: \
|
||||
CONFIG += force_bootstrap
|
||||
|
||||
android|ios|winrt: \
|
||||
CONFIG += builtin_testdata
|
||||
|
||||
CONFIG += \
|
||||
create_prl link_prl \
|
||||
prepare_docs qt_docs_targets \
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ isEmpty(BUILDS)|build_pass {
|
|||
INSTALLS += target
|
||||
}
|
||||
|
||||
contains(INSTALLS, target) {
|
||||
!builtin_testdata:contains(INSTALLS, target) {
|
||||
# Install testdata and helpers as well, but only if we're actually installing the test.
|
||||
#
|
||||
# Testdata is installed relative to the directory containing the testcase
|
||||
|
|
@ -180,6 +180,20 @@ contains(INSTALLS, target) {
|
|||
}
|
||||
}
|
||||
|
||||
builtin_testdata {
|
||||
ALL_TESTDATA = $$TESTDATA $$GENERATED_TESTDATA
|
||||
# RESOURCES does not support wildcards (for good reasons)
|
||||
for(td, ALL_TESTDATA): \
|
||||
testdata.files += $$files($$absolute_path($$td, $$_PRO_FILE_PWD_))
|
||||
!isEmpty(testdata.files) {
|
||||
testdata.base = $$_PRO_FILE_PWD_
|
||||
RESOURCES += testdata
|
||||
}
|
||||
|
||||
!isEmpty(TEST_HELPER_INSTALLS): \
|
||||
error("This platform does not support tests which require helpers.")
|
||||
}
|
||||
|
||||
macx-xcode:bundle:isEmpty(QMAKE_BUNDLE_EXTENSION) {
|
||||
QMAKE_PBX_PRODUCT_TYPE = com.apple.product-type.bundle.unit-test
|
||||
QMAKE_PBX_BUNDLE_TYPE = wrapper.cfbundle
|
||||
|
|
|
|||
Loading…
Reference in New Issue