diff options
Diffstat (limited to 'tests/testlibs')
-rw-r--r-- | tests/testlibs/gmock/gmock.pri | 5 | ||||
-rw-r--r-- | tests/testlibs/gmock/gmock.pro | 20 | ||||
-rw-r--r-- | tests/testlibs/gtest/gtest.pri | 5 | ||||
-rw-r--r-- | tests/testlibs/gtest/gtest.pro | 20 | ||||
-rw-r--r-- | tests/testlibs/mirtestlib/mirtestlib.pri | 9 | ||||
-rw-r--r-- | tests/testlibs/mirtestlib/mirtestlib.pro | 8 | ||||
-rw-r--r-- | tests/testlibs/testlibs.pri | 3 | ||||
-rw-r--r-- | tests/testlibs/testlibs.pro | 6 | ||||
-rw-r--r-- | tests/testlibs/testmain.cpp | 22 |
9 files changed, 98 insertions, 0 deletions
diff --git a/tests/testlibs/gmock/gmock.pri b/tests/testlibs/gmock/gmock.pri new file mode 100644 index 0000000..741f4ff --- /dev/null +++ b/tests/testlibs/gmock/gmock.pri @@ -0,0 +1,5 @@ +GMOCK_INCLUDE_DIR = /usr/include/gmock + +INCLUDEPATH += $$GMOCK_INCLUDE_DIR + +LIBS += $$PWD/libgmock.a diff --git a/tests/testlibs/gmock/gmock.pro b/tests/testlibs/gmock/gmock.pro new file mode 100644 index 0000000..c56197b --- /dev/null +++ b/tests/testlibs/gmock/gmock.pro @@ -0,0 +1,20 @@ +TARGET = gmock +TEMPLATE = lib +CONFIG += static + +CONFIG -= qt + +GMOCK_SRC_DIR = /usr/src/gmock +GMOCK_INCLUDE_DIR = /usr/include/gmock + +SOURCES = $$GMOCK_SRC_DIR/src/gmock-all.cc + + + + +INCLUDEPATH += $$GMOCK_INCLUDE_DIR + +### gcc docs claim that quoted includes should come from local directory, +### but that does not seem to work :/ +QMAKE_CXXFLAGS += -iquote $$GMOCK_SRC_DIR + diff --git a/tests/testlibs/gtest/gtest.pri b/tests/testlibs/gtest/gtest.pri new file mode 100644 index 0000000..4572389 --- /dev/null +++ b/tests/testlibs/gtest/gtest.pri @@ -0,0 +1,5 @@ +GTEST_INCLUDE_DIR = /usr/include/gtest + +INCLUDEPATH += $$GTEST_INCLUDE_DIR + +LIBS += $$PWD/libgtest.a diff --git a/tests/testlibs/gtest/gtest.pro b/tests/testlibs/gtest/gtest.pro new file mode 100644 index 0000000..702d927 --- /dev/null +++ b/tests/testlibs/gtest/gtest.pro @@ -0,0 +1,20 @@ +TARGET = gtest +TEMPLATE = lib +CONFIG += static + +CONFIG -= qt + +GTEST_SRC_DIR = /usr/src/gtest +GTEST_INCLUDE_DIR = /usr/include/gtest + +SOURCES = $$GTEST_SRC_DIR/src/gtest-all.cc + + + + +INCLUDEPATH += $$GTEST_INCLUDE_DIR + +### gcc docs claim that quoted includes should come from local directory, +### but that does not seem to work :/ +QMAKE_CXXFLAGS += -iquote $$GTEST_SRC_DIR + diff --git a/tests/testlibs/mirtestlib/mirtestlib.pri b/tests/testlibs/mirtestlib/mirtestlib.pri new file mode 100644 index 0000000..fb5c510 --- /dev/null +++ b/tests/testlibs/mirtestlib/mirtestlib.pri @@ -0,0 +1,9 @@ +CONFIG += link_pkgconfig +PKGCONFIG += mirclient mirserver + +INCLUDEPATH += $$PWD/../../../src/platforms/mirserver/ +INCLUDEPATH += $$PWD/../../../src/common +INCLUDEPATH += $$PWD/../../../src/modules/ +INCLUDEPATH += $$PWD/../../../src/modules/Unity/Application + +LIBS += $$PWD/libmirtestlib.a diff --git a/tests/testlibs/mirtestlib/mirtestlib.pro b/tests/testlibs/mirtestlib/mirtestlib.pro new file mode 100644 index 0000000..bf9b569 --- /dev/null +++ b/tests/testlibs/mirtestlib/mirtestlib.pro @@ -0,0 +1,8 @@ +TARGET = mirtestlib +CONFIG += c++11 + +TEMPLATE = lib +CONFIG += static +DEFINES = QT_MIR_NO_TRACEPOINTS + +include (../../../src/modules/Unity/Application/Application.pri) diff --git a/tests/testlibs/testlibs.pri b/tests/testlibs/testlibs.pri new file mode 100644 index 0000000..5002c28 --- /dev/null +++ b/tests/testlibs/testlibs.pri @@ -0,0 +1,3 @@ +include (gmock/gmock.pri) +include (gtest/gtest.pri) +include (mirtestlib/mirtestlib.pri) diff --git a/tests/testlibs/testlibs.pro b/tests/testlibs/testlibs.pro new file mode 100644 index 0000000..9ef668b --- /dev/null +++ b/tests/testlibs/testlibs.pro @@ -0,0 +1,6 @@ +TEMPLATE = subdirs + +SUBDIRS += \ + gmock \ + gtest \ + mirtestlib diff --git a/tests/testlibs/testmain.cpp b/tests/testlibs/testmain.cpp new file mode 100644 index 0000000..3f77fc0 --- /dev/null +++ b/tests/testlibs/testmain.cpp @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2015 Canonical, Ltd. + * + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License version 3, as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, + * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <gtest/gtest.h> + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} |