mirror of https://github.com/sipwise/rtpengine.git
Since dh_auto_test doesn't execute the test suites through make
directly, but instead runs `make -s -n` and then executes the output,
the integrated build tests fail since the sub-make doesn't return an
error as it should when attempting to build with the wrong .h
alternative, resulting in always the first .h alternative being used.
Fix this by using a wrapper script instead.
Also adjust some other related minor build details.
closes #1202
Change-Id: I4b6436295c6b39117bd06df53aa5afc7118ad6a1
(cherry picked from commit 52d9768418)
mr9.3.1
parent
79ec3dfa0b
commit
c925ab87ba
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
TARGET=$1
|
||||
ROOT=$(echo "$TARGET" | sed 's/\.h$//')
|
||||
if test "x$MAKE" = x; then
|
||||
MAKE=make
|
||||
fi
|
||||
echo "Looking for usable alternative for $TARGET"
|
||||
rm -f "$ROOT"-test "$ROOT"-test.c
|
||||
ln -s ../lib/"$ROOT"-test.c
|
||||
for x in ../lib/"$ROOT"*.h; do
|
||||
echo "Trying build with $x"
|
||||
rm -f "$TARGET"
|
||||
(echo '/******** GENERATED FILE ********/'; cat "$x") > "$TARGET"
|
||||
$MAKE "$ROOT"-test && break
|
||||
echo "Failed build with $x"
|
||||
rm -f "$TARGET"
|
||||
done
|
||||
rm -f "$ROOT"-test "$ROOT"-test.c
|
||||
test -f "$TARGET"
|
||||
Loading…
Reference in new issue