Codebase list geocode-glib / a121e19
d/tests/build: Make autopkgtest cross-test-friendly Thanks: Steve Langasek Closes: #946377 Simon McVittie 4 years ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
55 AUTOPKGTEST_TMP is now required to be set, and we do not fall back
66 to the deprecated ADTTMP.
77 * d/tests/build: Fix a shellcheck warning
8 * d/tests/build: Make autopkgtest cross-test-friendly.
9 Thanks to Steve Langasek. (Closes: #946377)
810
911 -- Simon McVittie <smcv@debian.org> Thu, 26 Dec 2019 16:18:26 +0000
1012
55 set -x
66
77 cd "${AUTOPKGTEST_TMP}"
8
9 if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
10 CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
11 else
12 CROSS_COMPILE=
13 fi
814
915 cat > trivial.c <<EOF
1016 #include <geocode-glib/geocode-glib.h>
1824
1925 # Deliberately word-splitting, that's how pkg-config works:
2026 # shellcheck disable=SC2046
21 gcc -o trivial trivial.c $(pkg-config --cflags --libs geocode-glib-1.0)
27 "${CROSS_COMPILE}gcc" -o trivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs geocode-glib-1.0)
2228 test -x trivial
2329 ./trivial