diff --git a/.travis.yml b/.travis.yml index 576f1ac3e..688e24370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -237,13 +237,13 @@ script: - make -s -j2 - cd ../ # Build gui/test -# - cd gui/test -# - qmake -# - make -# - filelist/test-filelist -# - projectfile/test-projectfile -# - xmlreportv2/test-xmlreportv2 -# - cd ../.. + - cd gui/test + - qmake + - make + - filelist/test-filelist + - projectfile/test-projectfile + - xmlreportv2/test-xmlreportv2 + - cd ../.. # Build triage - cd ./tools/triage - git clean -dfx . diff --git a/gui/test/common.pri b/gui/test/common.pri index ae7eacfe6..e6589d8ed 100644 --- a/gui/test/common.pri +++ b/gui/test/common.pri @@ -1,28 +1,7 @@ QT += testlib -INCLUDEPATH += $${PWD}/.. - -LIBS += -L$$PWD/../../externals -INCLUDEPATH += $${PWD}/../../externals - -include($${PWD}/../../lib/lib.pri) - -# GUI -SOURCES += $${PWD}/../erroritem.cpp \ - $${PWD}/../filelist.cpp \ - $${PWD}/../projectfile.cpp \ - $${PWD}/../report.cpp \ - $${PWD}/../translationhandler.cpp \ - $${PWD}/../xmlreport.cpp \ - $${PWD}/../xmlreportv2.cpp - -HEADERS += $${PWD}/../erroritem.h \ - $${PWD}/../filelist.h \ - $${PWD}/../projectfile.h \ - $${PWD}/../report.h \ - $${PWD}/../translationhandler.h \ - $${PWD}/../xmlreport.h \ - $${PWD}/../xmlreportv2.h +INCLUDEPATH += $${PWD}/.. \ + $${PWD}/../../lib contains(QMAKE_CC, gcc) { QMAKE_CXXFLAGS += -std=c++11 diff --git a/gui/test/filelist/filelist.pro b/gui/test/filelist/filelist.pro index c5e29cd71..9f87d10f6 100644 --- a/gui/test/filelist/filelist.pro +++ b/gui/test/filelist/filelist.pro @@ -1,16 +1,22 @@ TEMPLATE = app TARGET = test-filelist DEPENDPATH += . -INCLUDEPATH += . +INCLUDEPATH += . ../../../externals/simplecpp OBJECTS_DIR = ../build MOC_DIR = ../build QT += testlib include(../common.pri) -DEFINES += SRCDIR=\\\"$$PWD\\\" - # tests -SOURCES += testfilelist.cpp +SOURCES += testfilelist.cpp \ + ../../filelist.cpp \ + ../../../lib/pathmatch.cpp \ + ../../../lib/path.cpp \ + ../../../externals/simplecpp/simplecpp.cpp -HEADERS += testfilelist.h +HEADERS += testfilelist.h \ + ../../filelist.h \ + ../../../lib/pathmatch.h \ + ../../../lib/path.h \ + ../../../externals/simplecpp/simplecpp.h diff --git a/gui/test/projectfile/projectfile.pro b/gui/test/projectfile/projectfile.pro index 054ade280..771f7f3ca 100644 --- a/gui/test/projectfile/projectfile.pro +++ b/gui/test/projectfile/projectfile.pro @@ -7,9 +7,9 @@ MOC_DIR = ../build include(../common.pri) -DEFINES += SRCDIR=\\\"$$PWD\\\" - # tests -SOURCES += testprojectfile.cpp +SOURCES += testprojectfile.cpp \ + ../../projectfile.cpp -HEADERS += testprojectfile.h +HEADERS += testprojectfile.h \ + ../../projectfile.h diff --git a/gui/test/test.pro b/gui/test/test.pro index 9e2d2248f..7f75e3711 100644 --- a/gui/test/test.pro +++ b/gui/test/test.pro @@ -3,8 +3,7 @@ CONFIG += ordered TEMPLATE = subdirs -SUBDIRS = benchmark \ +SUBDIRS = \ filelist \ projectfile \ - translationhandler \ xmlreportv2 diff --git a/gui/test/xmlreportv2/xmlreportv2.pro b/gui/test/xmlreportv2/xmlreportv2.pro index fb1539a74..26851a356 100644 --- a/gui/test/xmlreportv2/xmlreportv2.pro +++ b/gui/test/xmlreportv2/xmlreportv2.pro @@ -1,15 +1,24 @@ TEMPLATE = app TARGET = test-xmlreportv2 DEPENDPATH += . -INCLUDEPATH += . +INCLUDEPATH += . ../../../externals/simplecpp ../../../externals/tinyxml OBJECTS_DIR = ../build MOC_DIR = ../build include(../common.pri) +include(../../../lib/lib.pri) DEFINES += SRCDIR=\\\"$$PWD\\\" # tests -SOURCES += testxmlreportv2.cpp +SOURCES += testxmlreportv2.cpp \ + ../../erroritem.cpp \ + ../../report.cpp \ + ../../xmlreport.cpp \ + ../../xmlreportv2.cpp -HEADERS += testxmlreportv2.h +HEADERS += testxmlreportv2.h \ + ../../erroritem.h \ + ../../report.h \ + ../../xmlreport.cpp \ + ../../xmlreportv2.h