Skip to content

Commit

Permalink
Merge pull request #4 from matthewvogt/suite-rename
Browse files Browse the repository at this point in the history
Use iodata-qt5-tests for the test suite name with Qt5
  • Loading branch information
saukko committed Jun 20, 2013
2 parents 5fcfd78 + ca6361e commit bc0440b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
29 changes: 20 additions & 9 deletions tests/tests.pro
@@ -1,20 +1,31 @@
VERSION = $$(IODATA_VERSION)
TEMPLATE = app
QT -= gui
equals(QT_MAJOR_VERSION, 4): TARGET = iodata-test
equals(QT_MAJOR_VERSION, 5): TARGET = iodata-qt5-test

INSTALLS = target tests
equals(QT_MAJOR_VERSION, 4): PACKAGENAME = iodata
equals(QT_MAJOR_VERSION, 5): PACKAGENAME = iodata-qt5

equals(QT_MAJOR_VERSION, 4): LIBS += -liodata
equals(QT_MAJOR_VERSION, 5): LIBS += -liodata-qt5
TARGET = $${PACKAGENAME}-test

LIBS += -l$${PACKAGENAME}
QMAKE_LIBDIR_FLAGS += -L../src

SOURCES = iodata-test.cpp

equals(QT_MAJOR_VERSION, 4): tests.path = /usr/share/iodata-tests
equals(QT_MAJOR_VERSION, 5): tests.path = /usr/share/iodata-qt5-tests
target.path = /usr/bin

tests.files = tests.xml
tests_xml.target = tests.xml
tests_xml.depends = $$PWD/tests.xml.in
tests_xml.commands = sed -e "s:@PACKAGENAME@:$${PACKAGENAME}:g" $< > $@
tests_xml.CONFIG += no_check_exist

QMAKE_EXTRA_TARGETS = tests_xml
QMAKE_CLEAN += $$tests_xml.target
PRE_TARGETDEPS += $$tests_xml.target

tests_install.path = /usr/share/$${PACKAGENAME}-tests
tests_install.files = $$tests_xml.target
tests_install.CONFIG += no_check_exist

INSTALLS = target tests_install

target.path = /usr/bin
4 changes: 2 additions & 2 deletions tests/tests.xml → tests/tests.xml.in
@@ -1,6 +1,6 @@
<testdefinition version="0.1">
<suite name="iodata-tests" domain="System Software">
<set name="simple_tests" description="basic iodata functionality" feature="System Control" requirement="MaSSW-815, MaSSW-1167">
<suite name="@PACKAGENAME@-tests" domain="System Software">
<set name="@PACKAGENAME@-simple_tests" description="basic iodata functionality" feature="System Control" requirement="MaSSW-815, MaSSW-1167">
<environments><scratchbox>false</scratchbox><hardware>true</hardware></environments>
<case name="trivial" description="parse a trivial structure from a string" subfeature="TimeAlarm">
<step>iodata-test trivial</step>
Expand Down

0 comments on commit bc0440b

Please sign in to comment.