Mir

Merge lp:~alan-griffiths/mir/fix-1196987 into lp:~mir-team/mir/trunk

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 817
Proposed branch: lp:~alan-griffiths/mir/fix-1196987
Merge into: lp:~mir-team/mir/trunk
Diff against target: 102 lines (+14/-20)
5 files modified
CMakeLists.txt (+5/-10)
cross-compile-chroot.sh (+4/-0)
debian/control (+1/-0)
tests/CMakeLists.txt (+3/-10)
tools/setup-partial-armhf-chroot.sh (+1/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-1196987
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Thomas Voß (community) Approve
Kevin DuBois (community) Approve
Review via email: mp+172798@code.launchpad.net

Commit message

Make gmock and umockdev dependencies of the tests, clean up, and make not building tests an option.

Description of the change

Make gmock and umockdev dependencies of the tests, clean up, and make not building tests an option.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

This doesn't address the ugliness of needing LD_PRELOAD=libumockdev-preload.so for unit-tests - but it does address the bug report.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

seems a useful option (provided its always set to ON by default)

review: Approve
Revision history for this message
Thomas Voß (thomas-voss) wrote :

lines 46-55: Why do we remove these options? They still are useful if we are building in a chroot with tests enabled and I think we shouldn't remove these options.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> lines 46-55: Why do we remove these options? They still are useful if we are
> building in a chroot with tests enabled and I think we shouldn't remove these
> options.

Because all they do is output messages?

Revision history for this message
Thomas Voß (thomas-voss) wrote :

> > lines 46-55: Why do we remove these options? They still are useful if we are
> > building in a chroot with tests enabled and I think we shouldn't remove
> these
> > options.
>
> Because all they do is output messages?

My bad :) LGTM, then.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Dammit, in the cross-build case libumockdev is loaded into the partial chroot, but not detected by pkg_check_modules() unless installed on the host system. And my google foo has failed me. :(

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-07-03 21:41:28 +0000
3+++ CMakeLists.txt 2013-07-05 10:16:26 +0000
4@@ -110,10 +110,8 @@
5
6 add_definitions(-DANDROID_USE_STD)
7
8-# By default we can run our tests
9-set( MIR_TESTS_AVAILABLE TRUE )
10-
11 if (MIR_PLATFORM STREQUAL "android")
12+ find_package( PkgConfig )
13 include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/3rd_party/android-deps)
14 list(APPEND CMAKE_SYSTEM_INCLUDE_PATH "${PROJECT_SOURCE_DIR}/3rd_party/android-deps")
15
16@@ -131,11 +129,6 @@
17 pkg_check_modules( GBM REQUIRED gbm>=9.0.0)
18 pkg_check_modules( DRM REQUIRED libdrm )
19 pkg_check_modules( UDEV REQUIRED libudev )
20- pkg_check_modules( UMOCKDEV umockdev-1.0 )
21- if ( NOT UMOCKDEV_FOUND )
22- message( WARNING "Umockdev not found, tests are disabled" )
23- set(MIR_TESTS_AVAILABLE FALSE)
24- endif ()
25 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__GBM__")
26 else ()
27 message (FATAL_ERROR "MIR_BACKEND must be either 'android' or 'gbm'")
28@@ -190,10 +183,12 @@
29 # Restore -Werror for non-3rd-party code
30 set (CMAKE_CXX_FLAGS ${OLD_CMAKE_CXX_FLAGS})
31
32-add_subdirectory(benchmarks/)
33-if (MIR_TESTS_AVAILABLE)
34+option(MIR_ENABLE_TESTS "Build tests" ON)
35+
36+if (MIR_ENABLE_TESTS)
37 add_subdirectory(tests/)
38 endif ()
39+add_subdirectory(benchmarks/)
40 add_subdirectory(tools/)
41 add_subdirectory(examples/)
42 add_subdirectory(guides/)
43
44=== modified file 'cross-compile-chroot.sh'
45--- cross-compile-chroot.sh 2013-05-10 00:39:29 +0000
46+++ cross-compile-chroot.sh 2013-07-05 10:16:26 +0000
47@@ -23,6 +23,10 @@
48 mkdir ${BUILD_DIR}
49 pushd ${BUILD_DIR} > /dev/null
50
51+ export PKG_CONFIG_PATH="${MIR_NDK_PATH}/usr/lib/pkgconfig:${MIR_NDK_PATH}/usr/lib/arm-linux-gnueabihf/pkgconfig"
52+ export PKG_CONFIG_EXECUTABLE=`which pkg-config`
53+ echo "Using PKG_CONFIG_PATH: $PKG_CONFIG_PATH"
54+ echo "Using PKG_CONFIG_EXECUTABLE: $PKG_CONFIG_EXECUTABLE"
55 cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxCrossCompile.cmake \
56 -DBoost_COMPILER=-gcc \
57 -DMIR_PLATFORM=android \
58
59=== modified file 'debian/control'
60--- debian/control 2013-07-02 00:13:55 +0000
61+++ debian/control 2013-07-05 10:16:26 +0000
62@@ -5,6 +5,7 @@
63 XSBC-Original-Maintainer: Thomas Voß <thomas.voss@canonical.com>
64 Build-Depends: cmake,
65 cmake-data,
66+ pkg-config,
67 debhelper (>= 9),
68 doxygen,
69 xsltproc,
70
71=== modified file 'tests/CMakeLists.txt'
72--- tests/CMakeLists.txt 2013-07-03 23:42:13 +0000
73+++ tests/CMakeLists.txt 2013-07-05 10:16:26 +0000
74@@ -1,13 +1,6 @@
75-if(NOT DEFINED ENV{MIR_TESTS_USE_REAL_GRAPHICS})
76- message(STATUS "Tests are NOT run with real graphics support.")
77-else()
78- message(STATUS "Tests are run with real graphics.")
79-endif()
80-
81-if(NOT DEFINED ENV{MIR_TESTS_USE_REAL_INPUT})
82- message(STATUS "Tests are NOT run with real input.")
83-else()
84- message(STATUS "Tests are run with real input.")
85+pkg_check_modules(UMOCKDEV umockdev-1.0)
86+if (NOT UMOCKDEV_FOUND)
87+ message(FATAL_ERROR "Umockdev not found, cannot build without disabling tests (via MIR_ENABLE_TESTS).")
88 endif()
89
90 if ("${CMAKE_CXX_COMPILER}" MATCHES "clang")
91
92=== modified file 'tools/setup-partial-armhf-chroot.sh'
93--- tools/setup-partial-armhf-chroot.sh 2013-07-02 22:02:44 +0000
94+++ tools/setup-partial-armhf-chroot.sh 2013-07-05 10:16:26 +0000
95@@ -74,6 +74,7 @@
96 libgles2-mesa-dev
97 libxkbcommon0
98 libxkbcommon-dev
99+ libumockdev-dev
100 liblttng-ust0
101 liburcu1
102 libuuid1

Subscribers

People subscribed via source and target branches