From 21c2e77428fa0e2bba35b43523a7af028bc3e676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= Date: Sat, 22 Aug 2020 18:30:57 +0200 Subject: [PATCH] Make our autopkgtest cross-test-friendly --- debian/tests/control | 4 +++- debian/tests/ipc | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/tests/control b/debian/tests/control index 35c6ed9..0354a96 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,5 @@ -Depends: libqb-dev, gcc, libc6-dev, pkg-config +Depends: libqb-dev, + build-essential, + pkg-config, Tests: ipc Restrictions: allow-stderr diff --git a/debian/tests/ipc b/debian/tests/ipc index e24cf41..baec3e8 100755 --- a/debian/tests/ipc +++ b/debian/tests/ipc @@ -1,14 +1,18 @@ #!/bin/sh -ex +DEB_HOST_GNU_TYPE=$(dpkg-architecture -q DEB_HOST_GNU_TYPE) +CC=$DEB_HOST_GNU_TYPE-gcc +PKG_CONFIG=$DEB_HOST_GNU_TYPE-pkg-config + cd examples # the os_base.h in-tree header includes inttypes.h for the examples ln -sf /usr/include/inttypes.h os_base.h # -f to enable repeated runs -gcc $(pkg-config --cflags libqb) \ +$CC $($PKG_CONFIG --cflags libqb) \ -o ipcserver ipcserver.c \ - $(pkg-config --libs libqb) -gcc $(pkg-config --cflags libqb) \ + $($PKG_CONFIG --libs libqb) +$CC $($PKG_CONFIG --cflags libqb) \ -o ipcclient ipcclient.c \ - $(pkg-config --libs libqb) + $($PKG_CONFIG --libs libqb) OUT="${AUTOPKGTEST_ARTIFACTS:-.}/out.txt" ERR="${AUTOPKGTEST_ARTIFACTS:-.}/err.txt"