Move test data to external resource.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-09-10 13:36:03 +03:00
parent 0536b42a7c
commit fe32cb133b
2 changed files with 15 additions and 3 deletions

View File

@ -226,5 +226,16 @@ else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpro
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
RESOURCES += \
share/test_data.qrc
DATA_RESOURCE = share/test_data.qrc # External Binary Resource
!exists($${OUT_PWD}/$${DESTDIR}/test_data.rcc) {
test_data.name = resource test_data
test_data.CONFIG += no_link target_predeps
test_data.input = DATA_RESOURCE # expects the name of a variable
test_data.output = ${QMAKE_FILE_BASE}.rcc
test_data.commands = $$shell_path($$[QT_INSTALL_BINS]/rcc) -binary ${QMAKE_FILE_IN} -o $${OUT_PWD}/$${DESTDIR}/${QMAKE_FILE_OUT}
QMAKE_EXTRA_COMPILERS += test_data
}
QMAKE_CLEAN += $${OUT_PWD}/$${DESTDIR}/test_data.rcc

View File

@ -59,10 +59,11 @@
int main(int argc, char** argv)
{
Q_INIT_RESOURCE(schema);
Q_INIT_RESOURCE(test_data);
TestVApplication app( argc, argv );// For QPrinter
QResource::registerResource(QStringLiteral("./test_data.rcc"));
int status = 0;
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
{