File: gdbus

package info (click to toggle)
cmake-extras 1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 776 kB
  • sloc: sh: 281; cpp: 189; python: 121; xml: 24; makefile: 4
file content (28 lines) | stat: -rwxr-xr-x 698 bytes parent folder | download | duplicates (4)
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
#!/bin/bash

# autopkgtest check: Build a trivial project that uses the
# find_package(GDbus) macro.
# (C) 2017 Canonical Ltd.

set -euo pipefail
IFS=$'\n\t'

tempdir=$(mktemp --tmpdir="${AUTOPKGTEST_TMP:-/tmp}" -d)
trap "rm -rf $tempdir" 0 INT QUIT ABRT PIPE TERM

srcdir="$(pwd)/examples/gdbus-demo"
bindir="${tempdir}/build"
installdir="${tempdir}/install"

mkdir -p "${bindir}"

echo -e "#!/bin/bash\nmake ARGS+=\"--output-on-failure\" test\n" > ${bindir}/run-gdbus-tests.sh
chmod a+x ${bindir}/run-gdbus-tests.sh

# Move into bindir temporarily
(
  cd "${bindir}"
  cmake "${srcdir}" -DCMAKE_INSTALL_PREFIX="${installdir}"
  make
  dbus-test-runner --bus-type=system -t ./run-gdbus-tests.sh
)