d/tests/build: Use correct compiler for proposed autopkgtest cross-architecture testing support

This commit is contained in:
Simon McVittie 2019-12-14 11:26:33 +00:00
parent d6fe4cec27
commit abe5d80192
2 changed files with 12 additions and 2 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ ostree (2019.6-1) UNRELEASED; urgency=medium
* New upstream release * New upstream release
- d/libostree-1-1.symbols: Update - d/libostree-1-1.symbols: Update
* d/tests/build: Use correct compiler for proposed autopkgtest
cross-architecture testing support
-- Simon McVittie <smcv@debian.org> Sat, 14 Dec 2019 10:52:40 +0000 -- Simon McVittie <smcv@debian.org> Sat, 14 Dec 2019 10:52:40 +0000

12
debian/tests/build vendored
View File

@ -6,6 +6,12 @@ set -x
cd "$AUTOPKGTEST_TMP" cd "$AUTOPKGTEST_TMP"
if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
else
CROSS_COMPILE=
fi
cat > trivial.c <<EOF cat > trivial.c <<EOF
#include <ostree.h> #include <ostree.h>
@ -16,7 +22,9 @@ int main (void)
} }
EOF EOF
gcc -o trivial trivial.c $(pkg-config --cflags --libs ostree-1 gobject-2.0) # Deliberately word-splitting, that's how pkg-config works:
# shellcheck disable=SC2046
"${CROSS_COMPILE}gcc" -o trivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs ostree-1 gobject-2.0)
test -x trivial test -x trivial
./trivial ./trivial
echo "ok 3 run it" echo "OK"