~ubuntu-branches/ubuntu/wily/upower/wily

« back to all changes in this revision

Viewing changes to debian/tests/build

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-03-19 19:19:51 UTC
  • mfrom: (17.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130319191951-2lmdpe40kitm2zbx
Tags: 0.9.20-1
* New upstream release.
* Bump libpolkit-gobject-1-dev build dependency as per upstream
  configure.ac.
* Build with --enable-deprecated, we are not ready yet to drop
  suspend/hibernate functionality.
* Bump Standards-Version to 3.9.4. No changes necessary.
* Add "build" autopkgtest to compile/link/run a simple program against
  libupower-glib.
* Drop unnecessary "needs-root" restriction from upstream-system
  autopkgtest.
* Add no_deprecation_define.patch: Do not require applications to define
  UPOWER_ENABLE_DEPRECATED to access suspend/resume functionality. We are
  not ready to do that yet in Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# autopkgtest check: Build and run a program against libupower-glib, to verify
 
3
# that the headers and pkg-config file are installed correctly
 
4
# (C) 2013 Canonical Ltd.
 
5
# Author: Martin Pitt <martin.pitt@ubuntu.com>
 
6
 
 
7
set -e
 
8
 
 
9
WORKDIR=$(mktemp -d)
 
10
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
 
11
cd $WORKDIR
 
12
cat <<EOF > libupowertest.c
 
13
#include <string.h>
 
14
#include <upower.h>
 
15
 
 
16
int main()
 
17
{
 
18
    UpClient *client = up_client_new ();
 
19
    g_assert_cmpint (strlen (up_client_get_daemon_version (client)), >, 4);
 
20
    /* note, this is marked as deprecated upstream */
 
21
    up_client_get_can_suspend (client);
 
22
    return 0;
 
23
}
 
24
EOF
 
25
 
 
26
gcc -o libupowertest libupowertest.c `pkg-config --cflags --libs upower-glib` -Wall -Werror
 
27
echo "build: OK"
 
28
[ -x libupowertest ]
 
29
env G_DEBUG="fatal-warnings fatal-criticals" ./libupowertest
 
30
echo "run: OK"