Merge lp:~compiz-team/compiz/compiz.fix_1060708 into lp:compiz/0.9.9

Proposed by Sam Spilsbury on 2012-10-03
Status: Merged
Approved by: Daniel van Vugt on 2012-10-03
Approved revision: 3408
Merged at revision: 3410
Proposed branch: lp:~compiz-team/compiz/compiz.fix_1060708
Merge into: lp:compiz/0.9.9
Diff against target: 150 lines (+72/-67)
1 file modified
compizconfig/gsettings/tests/CMakeLists.txt (+72/-67)
To merge this branch: bzr merge lp:~compiz-team/compiz/compiz.fix_1060708
Reviewer Review Type Date Requested Status
Daniel van Vugt 2012-10-03 Approve on 2012-10-03
jenkins (community) continuous-integration Needs Fixing on 2012-10-03
Review via email: mp+127654@code.launchpad.net

Commit message

Check the return value of pkg_check_modules and don't check for
libcompizconfig_internal (LP: #1060708)

Description of the change

Currently we are checking for libcompizconfig_internal to ensure that we link to the correct libcompizconfig - this is unnecessary, as cmake sets the rpath to our binary dirs anyways, so the tests will always be run with the correct libcompizconfig linked in. We didn't check the return value for the pkg config test so it was silently failing.

Check the return value of pkg_check_modules and don't check for libcompizconfig_internal

To post a comment you must log in.
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'compizconfig/gsettings/tests/CMakeLists.txt'
2--- compizconfig/gsettings/tests/CMakeLists.txt 2012-09-29 15:35:59 +0000
3+++ compizconfig/gsettings/tests/CMakeLists.txt 2012-10-03 07:20:44 +0000
4@@ -1,3 +1,4 @@
5+include (FindPkgConfig)
6 include (CompizGSettings)
7
8 include_directories (${CMAKE_CURRENT_SOURCE_DIR}
9@@ -11,70 +12,74 @@
10 ${CMAKE_SOURCE_DIR}/tests/shared
11 ${CMAKE_SOURCE_DIR}/tests/shared/glib)
12
13-pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS libcompizconfig_internal gio-2.0 glib-2.0)
14-
15-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
16-
17-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests)
18-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../testenvironments)
19-link_directories (${CMAKE_CURRENT_BINARY_DIR}/../mocks)
20-
21-add_library (compizconfig_gsettings_settings_test_env STATIC
22- ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_gsettings_settings_env_test.cpp)
23-
24-add_executable (compizconfig_test_gsettings
25- ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.cpp
26- ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_wrapper.cpp
27- ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp
28- ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h)
29-
30-add_executable (compizconfig_test_gsettings_conformance
31- ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_conformance.cpp)
32-
33-target_link_libraries (compizconfig_test_gsettings
34- compizconfig_gsettings_backend
35- compizconfig_ccs_setting_mock
36- compizconfig_ccs_plugin_mock
37- compizconfig_ccs_context_mock
38- compizconfig_ccs_gsettings_backend_mock
39- compizconfig_ccs_gsettings_wrapper_mock
40- compizconfig_ccs_test_value_combinations
41- ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
42- ${GTEST_BOTH_LIBRARIES}
43- ${GMOCK_MAIN_LIBRARY})
44-
45-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in
46- ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h)
47-
48-add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml
49- COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml
50- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml
51- VERBATIM)
52-
53-add_custom_target (compiz_gsettings_mock_schema ALL
54- DEPENDS ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml)
55-
56-add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema)
57-
58-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/backend-conformance-config.h.in
59- ${CMAKE_CURRENT_BINARY_DIR}/backend-conformance-config.h)
60-
61-target_link_libraries (compizconfig_test_gsettings_conformance
62- compizconfig_gsettings_settings_test_env
63- compizconfig_gsettings_backend
64- compizconfig_ccs_setting_mock
65- compizconfig_ccs_plugin_mock
66- compizconfig_ccs_context_mock
67- compizconfig_ccs_item_in_list_matcher
68- compizconfig_ccs_list_equality
69- compizconfig_ccs_list_wrapper
70- compizconfig_ccs_backend_conformance_test
71- compizconfig_ccs_setting_value_operators
72- compizconfig_ccs_test_value_combinations
73- compizconfig_ccs_integration_mock
74- ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
75- ${GTEST_BOTH_LIBRARIES}
76- ${GMOCK_MAIN_LIBRARY})
77-
78-compiz_discover_tests (compizconfig_test_gsettings COVERAGE compizconfig_gsettings_backend)
79-compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)
80+pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS gio-2.0 glib-2.0)
81+
82+if (COMPIZCONFIG_TEST_GSETTINGS_FOUND)
83+
84+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
85+
86+ link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests)
87+ link_directories (${CMAKE_CURRENT_BINARY_DIR}/../testenvironments)
88+ link_directories (${CMAKE_CURRENT_BINARY_DIR}/../mocks)
89+
90+ add_library (compizconfig_gsettings_settings_test_env STATIC
91+ ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_gsettings_settings_env_test.cpp)
92+
93+ add_executable (compizconfig_test_gsettings
94+ ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.cpp
95+ ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_wrapper.cpp
96+ ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp
97+ ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h)
98+
99+ add_executable (compizconfig_test_gsettings_conformance
100+ ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_conformance.cpp)
101+
102+ target_link_libraries (compizconfig_test_gsettings
103+ compizconfig_gsettings_backend
104+ compizconfig_ccs_setting_mock
105+ compizconfig_ccs_plugin_mock
106+ compizconfig_ccs_context_mock
107+ compizconfig_ccs_gsettings_backend_mock
108+ compizconfig_ccs_gsettings_wrapper_mock
109+ compizconfig_ccs_test_value_combinations
110+ ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
111+ ${GTEST_BOTH_LIBRARIES}
112+ ${GMOCK_MAIN_LIBRARY})
113+
114+ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in
115+ ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h)
116+
117+ add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml
118+ COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml
119+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml
120+ VERBATIM)
121+
122+ add_custom_target (compiz_gsettings_mock_schema ALL
123+ DEPENDS ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml)
124+
125+ add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema)
126+
127+ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/backend-conformance-config.h.in
128+ ${CMAKE_CURRENT_BINARY_DIR}/backend-conformance-config.h)
129+
130+ target_link_libraries (compizconfig_test_gsettings_conformance
131+ compizconfig_gsettings_settings_test_env
132+ compizconfig_gsettings_backend
133+ compizconfig_ccs_setting_mock
134+ compizconfig_ccs_plugin_mock
135+ compizconfig_ccs_context_mock
136+ compizconfig_ccs_item_in_list_matcher
137+ compizconfig_ccs_list_equality
138+ compizconfig_ccs_list_wrapper
139+ compizconfig_ccs_backend_conformance_test
140+ compizconfig_ccs_setting_value_operators
141+ compizconfig_ccs_test_value_combinations
142+ compizconfig_ccs_integration_mock
143+ ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
144+ ${GTEST_BOTH_LIBRARIES}
145+ ${GMOCK_MAIN_LIBRARY})
146+
147+ compiz_discover_tests (compizconfig_test_gsettings COVERAGE compizconfig_gsettings_backend)
148+ compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)
149+
150+endif (COMPIZCONFIG_TEST_GSETTINGS_FOUND)

Subscribers

People subscribed via source and target branches