Browse Source

added advanced testruns via make

pull/2/head
Skycoder42 6 years ago
parent
commit
92c694cd35
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 8
      qtmvvm.pro
  2. 1
      src/src.pro
  3. 4
      tests/auto/auto.pro
  4. 4
      tests/auto/mvvmcore/binding/binding.pro
  5. 16
      tests/auto/mvvmcore/coreapp/coreapp.pro
  6. 2
      tests/auto/mvvmcore/coreapp/tst_coreapp.cpp
  7. 3
      tests/auto/mvvmcore/mvvmcore.pro
  8. 2
      tests/auto/mvvmcore/qsettingsaccessor/qsettingsaccessor.pro
  9. 2
      tests/auto/mvvmcore/serviceregistry/serviceregistry.pro
  10. 2
      tests/auto/mvvmcore/serviceregistrytestplugin/serviceregistrytestplugin.pro
  11. 16
      tests/auto/mvvmcore/settingsconfigloader/settingsconfigloader.pro
  12. 2
      tests/auto/mvvmcore/settingsgenerator/settingsgenerator.pro
  13. 2
      tests/auto/mvvmdatasynccore/datasyncsettingsaccessor/datasyncsettingsaccessor.pro
  14. 3
      tests/auto/mvvmdatasynccore/mvvmdatasynccore.pro
  15. 3
      tests/auto/qml/qml.pro
  16. 2
      tests/auto/qml/qmlmvvmcore/qmlmvvmcore.pro
  17. 2
      tests/auto/qml/qmlsettingsgenerator/qmlsettingsgenerator.pro
  18. 55
      tests/auto/testrun.pri
  19. 3
      tests/tests.pro
  20. 1
      tools/tools.pro

8
qtmvvm.pro

@ -14,5 +14,13 @@ lrelease.recurse_target = lrelease
lrelease.recurse += sub_src
QMAKE_EXTRA_TARGETS += lrelease
runtests.target = run-tests
runtests.CONFIG = recursive
runtests.recurse_target = run-tests
runtests.recurse += sub_tests sub_src sub_tools
sub_runtest.target = sub-tests-runtests
sub_runtest.depends += sub-tests
QMAKE_EXTRA_TARGETS += sub_runtest runtests
DISTFILES += .qmake.conf \
sync.profile

1
src/src.pro

@ -24,3 +24,4 @@ imports.CONFIG += no_lrelease_target
prepareRecursiveTarget(lrelease)
QMAKE_EXTRA_TARGETS += lrelease
QMAKE_EXTRA_TARGETS += run-tests

4
tests/auto/auto.pro

@ -8,3 +8,7 @@ qtHaveModule(datasync) {
SUBDIRS += \
mvvmdatasynccore
}
cmake.CONFIG += no_run-tests_target
prepareRecursiveTarget(run-tests)
QMAKE_EXTRA_TARGETS += run-tests

4
tests/auto/mvvmcore/binding/binding.pro

@ -8,4 +8,6 @@ CONFIG -= app_bundle
TARGET = tst_binding
SOURCES += \
tst_binding.cpp
tst_binding.cpp
include(../../testrun.pri)

16
tests/auto/mvvmcore/coreapp/coreapp.pro

@ -8,12 +8,14 @@ CONFIG -= app_bundle
TARGET = tst_coreapp
SOURCES += \
tst_coreapp.cpp \
testapp.cpp \
testpresenter.cpp \
testviewmodel.cpp
tst_coreapp.cpp \
testapp.cpp \
testpresenter.cpp \
testviewmodel.cpp
HEADERS += \
testapp.h \
testpresenter.h \
testviewmodel.h
testapp.h \
testpresenter.h \
testviewmodel.h
include(../../testrun.pri)

2
tests/auto/mvvmcore/coreapp/tst_coreapp.cpp

@ -512,7 +512,7 @@ void CoreAppTest::testPresentMessage_data()
emit msgUnblock(true);
});
}} << MessageConfig{MessageConfig::TypeMessageBox, MessageConfig::SubTypeAbout}
.setTitle(QStringLiteral("%1 — Version %2")
.setTitle(tr("%1 — Version %2")
.arg(QGuiApplication::applicationDisplayName(), QCoreApplication::applicationVersion()))
.setViewProperty(QStringLiteral("addQtVersion"), true)
<< static_cast<int>(MessageConfig::Ok)

3
tests/auto/mvvmcore/mvvmcore.pro

@ -16,3 +16,6 @@ equals(MSVC_VER, 14.0) {
settingsgenerator \
settingsconfigloader
}
prepareRecursiveTarget(run-tests)
QMAKE_EXTRA_TARGETS += run-tests

2
tests/auto/mvvmcore/qsettingsaccessor/qsettingsaccessor.pro

@ -12,3 +12,5 @@ HEADERS += \
SOURCES += \
tst_qsettingsaccessor.cpp
include(../../testrun.pri)

2
tests/auto/mvvmcore/serviceregistry/serviceregistry.pro

@ -20,3 +20,5 @@ SOURCES += \
load(qt_build_paths)
DEFINES += PLUGIN_TESTDIR=\\\"$$MODULE_BASE_OUTDIR/tests/plugins\\\"
include(../../testrun.pri)

2
tests/auto/mvvmcore/serviceregistrytestplugin/serviceregistrytestplugin.pro

@ -16,3 +16,5 @@ SOURCES += \
testplugin.cpp
DISTFILES += serviceregistrytestplugin.json
QMAKE_EXTRA_TARGETS += run-tests

16
tests/auto/mvvmcore/settingsconfigloader/settingsconfigloader.pro

@ -27,10 +27,12 @@ DISTFILES += \
sectionDocument.xml \
categoryDocument.xml \
selectorDocument.xml \
includeDocument.xml \
includeDocument_category.xml \
includeDocument_section.xml \
includeDocument_group.xml \
includeDocument_entry.xml \
includeDocument_filtered.xml \
invalidDocument.xml
includeDocument.xml \
includeDocument_category.xml \
includeDocument_section.xml \
includeDocument_group.xml \
includeDocument_entry.xml \
includeDocument_filtered.xml \
invalidDocument.xml
include(../../testrun.pri)

2
tests/auto/mvvmcore/settingsgenerator/settingsgenerator.pro

@ -26,3 +26,5 @@ DISTFILES += \
import_config.xml
TRANSLATIONS += test_de.ts
include(../../testrun.pri)

2
tests/auto/mvvmdatasynccore/datasyncsettingsaccessor/datasyncsettingsaccessor.pro

@ -12,3 +12,5 @@ HEADERS += \
SOURCES += \
tst_datasyncsettingsaccessor.cpp
include(../../testrun.pri)

3
tests/auto/mvvmdatasynccore/mvvmdatasynccore.pro

@ -2,3 +2,6 @@ TEMPLATE = subdirs
SUBDIRS += \
datasyncsettingsaccessor
prepareRecursiveTarget(run-tests)
QMAKE_EXTRA_TARGETS += run-tests

3
tests/auto/qml/qml.pro

@ -5,3 +5,6 @@ SUBDIRS += \
qmlmvvmcore
equals(MSVC_VER, 14.0): SUBDIRS -= qmlsettingsgenerator
prepareRecursiveTarget(run-tests)
QMAKE_EXTRA_TARGETS += run-tests

2
tests/auto/qml/qmlmvvmcore/qmlmvvmcore.pro

@ -14,3 +14,5 @@ DISTFILES += \
importFiles.path = .
DEPLOYMENT += importFiles
include(../../testrun.pri)

2
tests/auto/qml/qmlsettingsgenerator/qmlsettingsgenerator.pro

@ -23,3 +23,5 @@ DISTFILES += \
importFiles.path = .
DEPLOYMENT += importFiles
include(../../testrun.pri)

55
tests/auto/testrun.pri

@ -0,0 +1,55 @@
linux {
runtarget_env_bin.target = run-tests
runtarget_env_bin.depends = export PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/bin/:$$[QT_INSTALL_BINS]:$(PATH)"
runtarget_env_lib.target = run-tests
runtarget_env_lib.depends = export LD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(LD_LIBRARY_PATH)"
runtarget_env_plugins.target = run-tests
runtarget_env_plugins.depends = export QT_PLUGIN_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/plugins/:$(QT_PLUGIN_PATH)"
runtarget_env_qml.target = run-tests
runtarget_env_qml.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$(QML2_IMPORT_PATH)"
runtarget_env_qpa.target = run-tests
runtarget_env_qpa.depends += export QT_QPA_PLATFORM := "minimal"
QMAKE_EXTRA_TARGETS += \
runtarget_env_bin \
runtarget_env_lib \
runtarget_env_plugins \
runtarget_env_qml\
runtarget_env_qpa
} else:mac {
runtarget_env_bin.target = run-tests
runtarget_env_bin.depends = export PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/bin/:$$[QT_INSTALL_BINS]:$(PATH)"
runtarget_env_lib.target = run-tests
runtarget_env_lib.depends = export DYLD_LIBRARY_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(DYLD_LIBRARY_PATH)"
runtarget_env_framework.target = run-tests
runtarget_env_framework.depends = export DYLD_FRAMEWORK_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/lib/:$$[QT_INSTALL_LIBS]:$(DYLD_FRAMEWORK_PATH)"
runtarget_env_plugins.target = run-tests
runtarget_env_plugins.depends = export QT_PLUGIN_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/plugins/:$(QT_PLUGIN_PATH)"
runtarget_env_qml.target = run-tests
runtarget_env_qml.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/:$(QML2_IMPORT_PATH)"
QMAKE_EXTRA_TARGETS += \
runtarget_env_bin \
runtarget_env_lib \
runtarget_env_framework \
runtarget_env_plugins \
runtarget_env_qml
} else:win32 {
runtarget_env_bin.target = run-tests
runtarget_env_bin.depends = export PATH := "$$shadowed($$dirname(_QMAKE_CONF_))\bin\;$$shell_path($$[QT_INSTALL_BINS]);$(PATH)"
runtarget_env_plugins.target = run-tests
runtarget_env_plugins.depends = export QT_PLUGIN_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/plugins/;$(QT_PLUGIN_PATH)"
runtarget_env_qml.target = run-tests
runtarget_env_qml.depends += export QML2_IMPORT_PATH := "$$shadowed($$dirname(_QMAKE_CONF_))/qml/;$(QML2_IMPORT_PATH)"
runtarget_env_qpa.target = run-tests
runtarget_env_qpa.depends += export QT_QPA_PLATFORM := "minimal"
QMAKE_EXTRA_TARGETS += \
runtarget_env_bin \
runtarget_env_plugins \
runtarget_env_qml\
runtarget_env_qpa
}
runtarget.target = run-tests
runtarget.depends += $(TARGET)
win32: runtarget.commands = .\$(TARGET)
else: runtarget.commands = ./$(TARGET)
QMAKE_EXTRA_TARGETS += runtarget

3
tests/tests.pro

@ -3,3 +3,6 @@ TEMPLATE = subdirs
CONFIG += no_docs_target
SUBDIRS += auto
prepareRecursiveTarget(run-tests)
QMAKE_EXTRA_TARGETS += run-tests

1
tools/tools.pro

@ -7,3 +7,4 @@ settingsgenerator.CONFIG += no_lrelease_target
prepareRecursiveTarget(lrelease)
QMAKE_EXTRA_TARGETS += lrelease
QMAKE_EXTRA_TARGETS += run-tests

Loading…
Cancel
Save