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
=== modified file 'compizconfig/gsettings/tests/CMakeLists.txt'
--- compizconfig/gsettings/tests/CMakeLists.txt 2012-09-29 15:35:59 +0000
+++ compizconfig/gsettings/tests/CMakeLists.txt 2012-10-03 07:20:44 +0000
@@ -1,3 +1,4 @@
1include (FindPkgConfig)
1include (CompizGSettings)2include (CompizGSettings)
23
3include_directories (${CMAKE_CURRENT_SOURCE_DIR}4include_directories (${CMAKE_CURRENT_SOURCE_DIR}
@@ -11,70 +12,74 @@
11 ${CMAKE_SOURCE_DIR}/tests/shared12 ${CMAKE_SOURCE_DIR}/tests/shared
12 ${CMAKE_SOURCE_DIR}/tests/shared/glib)13 ${CMAKE_SOURCE_DIR}/tests/shared/glib)
1314
14pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS libcompizconfig_internal gio-2.0 glib-2.0)15pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS gio-2.0 glib-2.0)
1516
16set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")17if (COMPIZCONFIG_TEST_GSETTINGS_FOUND)
1718
18link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests)19 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
19link_directories (${CMAKE_CURRENT_BINARY_DIR}/../testenvironments)20
20link_directories (${CMAKE_CURRENT_BINARY_DIR}/../mocks)21 link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests)
2122 link_directories (${CMAKE_CURRENT_BINARY_DIR}/../testenvironments)
22add_library (compizconfig_gsettings_settings_test_env STATIC23 link_directories (${CMAKE_CURRENT_BINARY_DIR}/../mocks)
23 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_gsettings_settings_env_test.cpp)24
2425 add_library (compizconfig_gsettings_settings_test_env STATIC
25add_executable (compizconfig_test_gsettings26 ${CMAKE_CURRENT_SOURCE_DIR}/compizconfig_ccs_gsettings_settings_env_test.cpp)
26 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.cpp27
27 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_wrapper.cpp28 add_executable (compizconfig_test_gsettings
28 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp29 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.cpp
29 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h)30 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_wrapper.cpp
3031 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp
31add_executable (compizconfig_test_gsettings_conformance32 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h)
32 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_conformance.cpp)33
3334 add_executable (compizconfig_test_gsettings_conformance
34target_link_libraries (compizconfig_test_gsettings35 ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_conformance.cpp)
35 compizconfig_gsettings_backend36
36 compizconfig_ccs_setting_mock37 target_link_libraries (compizconfig_test_gsettings
37 compizconfig_ccs_plugin_mock38 compizconfig_gsettings_backend
38 compizconfig_ccs_context_mock39 compizconfig_ccs_setting_mock
39 compizconfig_ccs_gsettings_backend_mock40 compizconfig_ccs_plugin_mock
40 compizconfig_ccs_gsettings_wrapper_mock41 compizconfig_ccs_context_mock
41 compizconfig_ccs_test_value_combinations42 compizconfig_ccs_gsettings_backend_mock
42 ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}43 compizconfig_ccs_gsettings_wrapper_mock
43 ${GTEST_BOTH_LIBRARIES}44 compizconfig_ccs_test_value_combinations
44 ${GMOCK_MAIN_LIBRARY})45 ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
4546 ${GTEST_BOTH_LIBRARIES}
46configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in47 ${GMOCK_MAIN_LIBRARY})
47 ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h)48
4849 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in
49add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml50 ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h)
50 COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml51
51 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml52 add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml
52 VERBATIM)53 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
5354 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml
54add_custom_target (compiz_gsettings_mock_schema ALL55 VERBATIM)
55 DEPENDS ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml)56
5657 add_custom_target (compiz_gsettings_mock_schema ALL
57add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema)58 DEPENDS ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml)
5859
59configure_file (${CMAKE_CURRENT_SOURCE_DIR}/backend-conformance-config.h.in60 add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema)
60 ${CMAKE_CURRENT_BINARY_DIR}/backend-conformance-config.h)61
6162 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/backend-conformance-config.h.in
62target_link_libraries (compizconfig_test_gsettings_conformance63 ${CMAKE_CURRENT_BINARY_DIR}/backend-conformance-config.h)
63 compizconfig_gsettings_settings_test_env64
64 compizconfig_gsettings_backend65 target_link_libraries (compizconfig_test_gsettings_conformance
65 compizconfig_ccs_setting_mock66 compizconfig_gsettings_settings_test_env
66 compizconfig_ccs_plugin_mock67 compizconfig_gsettings_backend
67 compizconfig_ccs_context_mock68 compizconfig_ccs_setting_mock
68 compizconfig_ccs_item_in_list_matcher69 compizconfig_ccs_plugin_mock
69 compizconfig_ccs_list_equality70 compizconfig_ccs_context_mock
70 compizconfig_ccs_list_wrapper71 compizconfig_ccs_item_in_list_matcher
71 compizconfig_ccs_backend_conformance_test72 compizconfig_ccs_list_equality
72 compizconfig_ccs_setting_value_operators73 compizconfig_ccs_list_wrapper
73 compizconfig_ccs_test_value_combinations74 compizconfig_ccs_backend_conformance_test
74 compizconfig_ccs_integration_mock75 compizconfig_ccs_setting_value_operators
75 ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}76 compizconfig_ccs_test_value_combinations
76 ${GTEST_BOTH_LIBRARIES}77 compizconfig_ccs_integration_mock
77 ${GMOCK_MAIN_LIBRARY})78 ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES}
7879 ${GTEST_BOTH_LIBRARIES}
79compiz_discover_tests (compizconfig_test_gsettings COVERAGE compizconfig_gsettings_backend)80 ${GMOCK_MAIN_LIBRARY})
80compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)81
82 compiz_discover_tests (compizconfig_test_gsettings COVERAGE compizconfig_gsettings_backend)
83 compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE compizconfig_gsettings_backend gsettings)
84
85endif (COMPIZCONFIG_TEST_GSETTINGS_FOUND)

Subscribers

People subscribed via source and target branches