Merge lp:~dobey/indicator-power/fix-gtest into lp:indicator-power

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 304
Merged at revision: 305
Proposed branch: lp:~dobey/indicator-power/fix-gtest
Merge into: lp:indicator-power
Diff against target: 102 lines (+5/-49)
4 files modified
CMakeLists.txt (+0/-3)
debian/control (+2/-1)
tests/CMakeLists.txt (+3/-7)
tests/Makefile.am.strings (+0/-38)
To merge this branch: bzr merge lp:~dobey/indicator-power/fix-gtest
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Ted Gould (community) Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+316614@code.launchpad.net

Commit message

Use gmock module from cmake-extras.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:304
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-power-ci/7/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1623
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1630
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1408/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1408/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1408/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1408/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1408/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1408
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1408/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-indicator-power-ci/7/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-05-16 18:09:57 +0000
+++ CMakeLists.txt 2017-02-07 19:50:14 +0000
@@ -85,9 +85,6 @@
8585
86# testing & coverage86# testing & coverage
87if (${enable_tests})87if (${enable_tests})
88 set (GTEST_SOURCE_DIR /usr/src/gtest/src)
89 set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
90 set (GTEST_LIBS -lpthread)
91 enable_testing ()88 enable_testing ()
92 if (${enable_lcov})89 if (${enable_lcov})
93 include(GCov)90 include(GCov)
9491
=== modified file 'debian/control'
--- debian/control 2016-07-19 10:25:12 +0000
+++ debian/control 2017-02-07 19:50:14 +0000
@@ -3,6 +3,7 @@
3Priority: optional3Priority: optional
4Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>4Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: cmake,5Build-Depends: cmake,
6 cmake-extras (>= 0.10),
6 libnotify-dev (>= 0.7.6),7 libnotify-dev (>= 0.7.6),
7 libglib2.0-dev (>= 2.36),8 libglib2.0-dev (>= 2.36),
8 libgudev-1.0-dev,9 libgudev-1.0-dev,
@@ -15,7 +16,7 @@
15 dh-translations,16 dh-translations,
16 intltool,17 intltool,
17# for tests18# for tests
18 libgtest-dev,19 googletest | google-mock,
19 python3-dbusmock,20 python3-dbusmock,
20 dbus-test-runner,21 dbus-test-runner,
21 libdbustest1-dev,22 libdbustest1-dev,
2223
=== modified file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 2016-05-16 17:59:03 +0000
+++ tests/CMakeLists.txt 2017-02-07 19:50:14 +0000
@@ -1,9 +1,5 @@
1# build libgtest1find_package(GMock)
2add_library (gtest STATIC 2include_directories(${GMOCK_INCLUDE_DIRS})
3 ${GTEST_SOURCE_DIR}/gtest-all.cc
4 ${GTEST_SOURCE_DIR}/gtest_main.cc)
5set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR})
6set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w)
73
8# dbustest4# dbustest
9pkg_check_modules(DBUSTEST REQUIRED5pkg_check_modules(DBUSTEST REQUIRED
@@ -50,7 +46,7 @@
50 add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled)46 add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled)
51 add_test (${TEST_NAME} ${TEST_NAME})47 add_test (${TEST_NAME} ${TEST_NAME})
52 add_dependencies (${TEST_NAME} ${SERVICE_LIB})48 add_dependencies (${TEST_NAME} ${SERVICE_LIB})
53 target_link_libraries (${TEST_NAME} ${SERVICE_LIB} gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS})49 target_link_libraries (${TEST_NAME} ${SERVICE_LIB} ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GMOCK_LIBRARIES})
54endfunction()50endfunction()
55add_test_by_name(test-notify)51add_test_by_name(test-notify)
56add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)52add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)
5753
=== removed file 'tests/Makefile.am.strings'
--- tests/Makefile.am.strings 2012-05-24 14:49:30 +0000
+++ tests/Makefile.am.strings 1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
1TESTS += \
2 test-ellipsis \
3 test-space-ellipsis \
4 test-ascii-quotes
5
6#####
7# Tests for there being proper ellipsis instead of three periods in a row
8#####
9test-ellipsis: $(top_srcdir)/po
10 @echo "#!/bin/bash" > $@
11 @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
12 @echo "grep -c -e \"^msgid.*\.\.\.\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Ellipsis found in user visible strings\" >&2 && exit 1" >> $@
13 @echo "exit 0" >> $@
14 @chmod +x $@
15
16#####
17# Tests for there being a space before an ellipsis
18#####
19test-space-ellipsis: $(top_srcdir)/po
20 @echo "#!/bin/bash" > $@
21 @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
22 @echo "grep -c -e \"^msgid.* …\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Space before ellipsis found in user visible strings\" >&2 && exit 1" >> $@
23 @echo "exit 0" >> $@
24 @chmod +x $@
25
26#####
27# Tests for ASCII quote types
28#####
29test-ascii-quotes: $(top_srcdir)/po
30 @echo "#!/bin/bash" > $@
31 @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@
32 @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@
33 @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@
34 @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@
35 @echo "exit 0" >> $@
36 @chmod +x $@
37
38CLEANFILES += $(TESTS)

Subscribers

People subscribed via source and target branches