File: libchamplain-gtk-0.12-dev

package info (click to toggle)
libchamplain 0.12.21-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,708 kB
  • sloc: ansic: 17,577; xml: 352; python: 348; javascript: 82; sh: 43; makefile: 8
file content (39 lines) | stat: -rwxr-xr-x 1,125 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
# autopkgtest check: Build and run a program against champlain, to verify
# that the headers and pkg-config file are installed correctly
# (C) 2012 Canonical Ltd.
# (C) 2018-2019 Simon McVittie
# Authors: Martin Pitt, Simon McVittie

set -eux

# Disable gvfs if it happens to be installed
export GIO_USE_VFS=local
export GIO_USE_VOLUME_MONITOR=unix

# This should be GTK_A11Y=none if this is ever switched to GTK4
export NO_AT_BRIDGE=1

srcdir="$(pwd)"
WORKDIR="$(mktemp -d)"
export HOME="$WORKDIR"
export XDG_RUNTIME_DIR="$WORKDIR"
trap 'cd /; rm -rf "$WORKDIR"' 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"

# Deliberately word-splitting pkg-config's output:
# shellcheck disable=SC2046
gcc -o minimal "${srcdir}/debian/tests/minimal-gtk.c" $(pkg-config --cflags --libs champlain-gtk-0.12)
echo "build: OK"
[ -x ./minimal ]
set -- ./minimal

if [ -z "${TEST_INTERACTIVE-}" ]; then
    echo "Doing noninteractive test. Try TEST_INTERACTIVE=1 if debugging"
    set -- xvfb-run -a dbus-run-session -- timeout --kill-after=3 30 "$@"
else
    echo "Doing interactive test. Close window to continue"
fi

"$@"
echo "run: OK"