mutter/debian/tests/libmutter-14-dev
Ward from fusion-voyager-3 a1d3a8b37d
Some checks failed
PikaOS Package Build & Release (Canary) (amd64-v3) / build (push) Has been cancelled
PikaOS Package Build Only (Canary) (amd64-v3) / build (push) Failing after 17s
PikaOS Package Build Only (amd64-v3) / build (push) Failing after 13s
PikaOS Package Build & Release (amd64-v3) / build (push) Failing after 13s
attempt to fix xwayland frac scale
2024-08-13 11:22:25 -04:00

42 lines
940 B
Bash
Executable File

#!/bin/sh
# autopkgtest check: Build and run a program against libmutter, 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
WORKDIR=$(mktemp -d)
export HOME="$WORKDIR"
export XDG_RUNTIME_DIR="$WORKDIR"
cleanup () {
rm -fr "$WORKDIR"
}
trap cleanup 0 INT QUIT ABRT PIPE TERM
cd "$WORKDIR"
if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
else
CROSS_COMPILE=
fi
cat <<'EOF' > trivial.c
#include <meta/util.h>
int main(void)
{
g_assert_false(meta_is_wayland_compositor());
return 0;
}
EOF
# Deliberately word-splitting pkg-config's output:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o trivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs libmutter-14)
echo "build: OK"
[ -x trivial ]
xvfb-run -a dbus-run-session -- ./trivial
echo "run: OK"