Make our autopkgtest cross-test-friendly

This commit is contained in:
Ferenc Wágner 2020-08-22 18:30:57 +02:00
parent 812cd6c378
commit 21c2e77428
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,5 @@
Depends: libqb-dev, gcc, libc6-dev, pkg-config
Depends: libqb-dev,
build-essential,
pkg-config,
Tests: ipc
Restrictions: allow-stderr

12
debian/tests/ipc vendored
View File

@ -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"