TEST: some improvements to the check script to make it's output better.

It quietens the output and this makes it easier to understand the
results.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2011-06-02 11:40:10 +10:00
parent 86e5071287
commit 776ce2d3fd

30
check
View File

@ -1,6 +1,7 @@
#!/bin/bash
export CFLAGS=-Wp,-D_FORTIFY_SOURCE=2
export CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=2 -O2"
export MAKEFLAGS="$MAKEFLAGS -s"
help_all() {
echo
@ -50,18 +51,24 @@ then
fi
if [ ! -e Makefile ]
then
./configure
./configure --quiet
fi
check() {
echo "$1"
( ./configure $1 --enable-fatal-warnings )
echo "./configure $1 --enable-fatal-warnings --quiet"
echo "ENV CFLAGS=\"$CFLAGS\""
echo "ENV MAKEFLAGS=\"$MAKEFLAGS\""
( ./configure $1 --enable-fatal-warnings --quiet )
make check
if [ $? -ne 0 ]
then
echo "======================"
echo failed: $1
echo "======================"
if [ -f tests/test-suite.log ]
then
cat tests/test-suite.log
fi
exit 1
fi
}
@ -77,7 +84,10 @@ check_nosection() {
check_sysv() {
# use sys-v semaphores
check "CFLAGS=-DDISABLE_POSIX_THREAD_PROCESS_SHARED"
ORIG_CFLAGS=$CFLAGS
export CFLAGS="$CFLAGS -DDISABLE_POSIX_THREAD_PROCESS_SHARED"
check
export CFLAGS=$ORIG_CFLAGS
}
check_notimerfd() {
@ -102,15 +112,18 @@ check_bsd() {
check_dist() {
# normal configure with distcheck
./configure
set +e
./configure --quiet
make distcheck
set -e
}
check_rpm() {
# check rpm
echo "checking rpm building"
set +e
make maintainer-clean
./autogen.sh
./configure
./configure --quiet
make rpm
echo
sudo rpm -Uvf --force libqb-*.rpm
@ -120,6 +133,7 @@ check_rpm() {
rpmlint libqb-debuginfo
echo rpmlint libqb-devel
rpmlint libqb-devel
set -e
}
check_all() {