diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2017-11-27 08:53:21 +0100 |
---|---|---|
committer | Antti Hölttä <ahoelttae@luxoft.com> | 2018-02-07 09:23:50 +0000 |
commit | 0448ec8f0cb3fb52d41e156c2ec15fcff225d2f9 (patch) | |
tree | 82dffc0ddb4638f19eab79199543561ab6442732 /tests | |
parent | 2cfdc03e5e4e8b5674dd13d8d179fde973976d27 (diff) | |
download | qtivi-0448ec8f0cb3fb52d41e156c2ec15fcff225d2f9.tar.gz |
Add an autotest generator template
The template generates a basic autotest for the generated
API and the backend interfaces.
It tests the following:
- default behavior when no or an invalid backend is connected.
- Changes from the backend are populated to the frontend API
- Changes in the frontend are populated to the backend API
The test are generated and executed for the autogenerator
test as well as for the ivivehiclefunctions module
Task-number: QTAUTO-365
Change-Id: Ie7ac78db821d930dca99c3e7db95c1d373460f85
Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
Diffstat (limited to 'tests')
9 files changed, 45 insertions, 3 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index bf3f50d..561f32b 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs qtHaveModule(ivicore): SUBDIRS += core -#qtHaveModule(ivivehiclefunctions): SUBDIRS += vehiclefunctions +qtHaveModule(ivivehiclefunctions): SUBDIRS += vehiclefunctions qtHaveModule(geniviextras): SUBDIRS += dlt diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/frontend/frontend.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/frontend/frontend.pro index 0902433..13144fc 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/frontend/frontend.pro +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/frontend/frontend.pro @@ -8,5 +8,7 @@ QT += ivicore ivicore-private qml quick DEFINES += QT_BUILD_NOPRIVATE_LIB +macos: QMAKE_SONAME_PREFIX = @rpath + QFACE_SOURCES = ../../../org.example.echo.noprivate.qface diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/org-example-echo-noprivate.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/org-example-echo-noprivate.pro index 8922ad6..40feb20 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/org-example-echo-noprivate.pro +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/org-example-echo-noprivate.pro @@ -4,7 +4,8 @@ QT_FOR_CONFIG += ivicore SUBDIRS = frontend \ backend_simulator \ - validator + validator \ + test qtConfig(simulator) { SUBDIRS += control_panel @@ -12,3 +13,4 @@ qtConfig(simulator) { backend_simulator.depends = frontend validator.depends = frontend +test.depends = frontend diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/test/test.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/test/test.pro new file mode 100644 index 0000000..f30a1c4 --- /dev/null +++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noprivate/test/test.pro @@ -0,0 +1,13 @@ +TARGET = tst_org-example-echo-noprivate +DESTDIR = ../ + +QT += testlib core ivicore +CONFIG += c++11 ivigenerator testcase + +INCLUDEPATH += $$OUT_PWD/../frontend +LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_noprivate_frontend) + +QMAKE_RPATHDIR += $$OUT_PWD/.. + +QFACE_FORMAT = test +QFACE_SOURCES = ../../../org.example.echo.noprivate.qface diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo/frontend/frontend.pro b/tests/auto/core/ivigenerator/projects/org-example-echo/frontend/frontend.pro index fdecab8..af958af 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo/frontend/frontend.pro +++ b/tests/auto/core/ivigenerator/projects/org-example-echo/frontend/frontend.pro @@ -8,5 +8,7 @@ QT += ivicore ivicore-private qml quick DEFINES += QT_BUILD_ECHO_LIB +macos: QMAKE_SONAME_PREFIX = @rpath + QFACE_SOURCES = ../../../org.example.echo.qface diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo/org-example-echo.pro b/tests/auto/core/ivigenerator/projects/org-example-echo/org-example-echo.pro index 7083d85..2446d17 100644 --- a/tests/auto/core/ivigenerator/projects/org-example-echo/org-example-echo.pro +++ b/tests/auto/core/ivigenerator/projects/org-example-echo/org-example-echo.pro @@ -3,6 +3,8 @@ TEMPLATE = subdirs SUBDIRS = frontend \ backend_simulator \ validator \ + test \ backend_simulator.depends = frontend validator.depends = frontend +test.depends = frontend diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo/test/test.pro b/tests/auto/core/ivigenerator/projects/org-example-echo/test/test.pro new file mode 100644 index 0000000..17cfdd7 --- /dev/null +++ b/tests/auto/core/ivigenerator/projects/org-example-echo/test/test.pro @@ -0,0 +1,13 @@ +TARGET = tst_org-example-echo +DESTDIR = ../ + +QT += testlib core ivicore +CONFIG += c++11 ivigenerator testcase + +INCLUDEPATH += $$OUT_PWD/../frontend +LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_frontend) + +QMAKE_RPATHDIR += $$OUT_PWD/.. + +QFACE_FORMAT = test +QFACE_SOURCES = ../../../org.example.echo.qface diff --git a/tests/auto/vehiclefunctions/basic/basic.pro b/tests/auto/vehiclefunctions/basic/basic.pro new file mode 100644 index 0000000..f67bb18 --- /dev/null +++ b/tests/auto/vehiclefunctions/basic/basic.pro @@ -0,0 +1,7 @@ +TARGET = tst_basic + +QT += testlib core ivicore ivivehiclefunctions +CONFIG += c++11 ivigenerator testcase + +QFACE_FORMAT = test +QFACE_SOURCES += ../../../../src/ivivehiclefunctions/ivivehiclefunctions.qface diff --git a/tests/auto/vehiclefunctions/vehiclefunctions.pro b/tests/auto/vehiclefunctions/vehiclefunctions.pro index cea792f..f8e6ba3 100644 --- a/tests/auto/vehiclefunctions/vehiclefunctions.pro +++ b/tests/auto/vehiclefunctions/vehiclefunctions.pro @@ -1,4 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = climatecontroltest \ +SUBDIRS = basic +#SUBDIRS = climatecontroltest \ windowcontroltest |