Move test data to external resource.
--HG-- branch : develop
This commit is contained in:
parent
0536b42a7c
commit
fe32cb133b
|
@ -226,5 +226,16 @@ else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpro
|
||||||
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
|
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
|
||||||
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
|
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
|
||||||
|
|
||||||
RESOURCES += \
|
DATA_RESOURCE = share/test_data.qrc # External Binary Resource
|
||||||
share/test_data.qrc
|
|
||||||
|
!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
|
||||||
|
|
|
@ -59,10 +59,11 @@
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
Q_INIT_RESOURCE(schema);
|
Q_INIT_RESOURCE(schema);
|
||||||
Q_INIT_RESOURCE(test_data);
|
|
||||||
|
|
||||||
TestVApplication app( argc, argv );// For QPrinter
|
TestVApplication app( argc, argv );// For QPrinter
|
||||||
|
|
||||||
|
QResource::registerResource(QStringLiteral("./test_data.rcc"));
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
auto ASSERT_TEST = [&status, argc, argv](QObject* obj)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user