Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F3151940
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/check b/check
index 2611e82..0fa81bb 100755
--- a/check
+++ b/check
@@ -1,289 +1,289 @@
#!/bin/bash
export CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=2 -O2"
export MAKEFLAGS="$MAKEFLAGS --no-print-directory"
help_all() {
echo
echo "Usage: check <command>"
echo
echo "Commands:"
echo
echo " ansi Check using ansi compiler option"
echo " sysv Check using sys-v semaphores"
echo " nosection Check without gcc __attribute__(section)"
echo " noepoll Check using poll (not epoll)"
echo " nogettime Check without gettime()"
echo " notimerfd Check without timerfd"
echo " bsd Check with a bsd-like config"
echo " mac Check with a mac/darwin-like config"
echo " dist do make distcheck"
echo " rpm Run rpmlint"
echo " mock Test doing a mock build"
echo " coverity Run coverity"
echo " abi Check abi compatibility"
- echo " api api sanity test"
+ echo " api_sanity api sanity test"
echo
echo " help This help"
echo
exit 1
}
if [ $# -lt 1 ]
then
help_all
fi
command=$1
shift
args="$@"
if [ -n "$(git rev-parse)" ] ; then
perror "Must be inside a git repository to work"
exit 1
fi
up=$(git rev-parse --show-cdup)
if [ "x$up" == "x" ] ; then
up="."
fi
cd $up
set -e
if [ ! -e install-sh ]
then
./autogen.sh
fi
if [ ! -e Makefile ]
then
./configure --quiet
fi
check() {
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
}
check_ansi() {
check "--enable-ansi"
}
check_nosection() {
# no __attribute__((section))
check "ac_cv_link_attribute_section=no"
}
check_sysv() {
# use sys-v semaphores
ORIG_CFLAGS=$CFLAGS
export CFLAGS="$CFLAGS -DDISABLE_POSIX_THREAD_PROCESS_SHARED"
check
export CFLAGS=$ORIG_CFLAGS
}
check_notimerfd() {
# no timerfd
check "ac_cv_func_timerfd_create=no ac_cv_header_sys_timerfd_h=no"
}
check_nogettime() {
# no clock_gettime
check "ac_cv_func_clock_gettime=no"
}
check_noepoll() {
# no epoll
check "ac_cv_func_epoll_create1=no ac_cv_func_epoll_create=no"
}
check_bsd() {
# bsd-like
check "ac_cv_func_timerfd_create=no ac_cv_header_sys_timerfd_h=no ac_cv_func_clock_gettime=no ac_cv_func_epoll_create1=no ac_cv_func_epoll_create=no"
}
check_mac() {
# mac-like
ORIG_CFLAGS=$CFLAGS
export CFLAGS="$CFLAGS -DDISABLE_POSIX_THREAD_PROCESS_SHARED"
check "ac_cv_supports_sysv_mq=no ac_cv_supports_posix_mq=no ac_cv_func_timerfd_create=no ac_cv_header_sys_timerfd_h=no ac_cv_func_clock_gettime=no ac_cv_func_epoll_create1=no ac_cv_func_epoll_create=no ac_cv_link_attribute_section=no"
export CFLAGS=$ORIG_CFLAGS
}
check_dist() {
# normal configure with distcheck
set +e
./configure --quiet
make distcheck
set -e
}
check_rpm() {
echo "checking rpm building"
set +e
make maintainer-clean
./autogen.sh
./configure --quiet
make rpm
echo
sudo rpm -Uvf --force libqb-*.rpm
echo rpmlint libqb
rpmlint libqb
echo rpmlint libqb-debuginfo
rpmlint libqb-debuginfo
echo rpmlint libqb-devel
rpmlint libqb-devel
set -e
}
check_mock() {
echo "checking mock building"
set +e
make maintainer-clean
rm -f *.rpm
./autogen.sh
./configure --quiet
make srpm
mock --no-clean --rebuild *.src.rpm
}
check_coverity() {
make clean
cov-build --dir=cov make
cov-analyze --dir cov --concurrency --wait-for-license
cov-format-errors --dir cov
}
check_abi() {
ver1=$1
ver2=$2
TMPL=build-aux/abi-check-templ.xml
checker=abi-compliance-checker
mkdir -p abi_dumps/libqb
for v in $ver1 $ver2
do
p=$(pwd)_inst_$v
sed -e "s|@PREFIX@|$p|" -e "s|@VERSION@|$v|" $TMPL > abi_dumps/libqb/$v.xml
done
for v in $ver1 $ver2
do
p=$(pwd)_inst_$v
t=v$v
b=api-check-$v
echo "== Version $v =="
if [ ! -f abi_dumps/libqb/libqb_$v.abi.tar.gz ]
then
git checkout -B $b $t
./autogen.sh
./configure
make
make install DESTDIR=$p
$checker -l libqb -dump_abi abi_dumps/libqb/$v.xml
fi
done
$checker -l libqb \
-d1 abi_dumps/libqb/libqb_$ver1.abi.tar.gz \
-d2 abi_dumps/libqb/libqb_$ver2.abi.tar.gz
google-chrome compat_reports/libqb/$ver1\_to_$ver2/abi_compat_report.html
echo mv compat_reports/libqb/$ver1\_to_$ver2/abi_compat_report.html abi_compat_report_$ver1\_to_$ver2.html
echo scp abi_compat_report_$ver1\_to_$ver2.html fedorahosted.org:quarterback
git checkout master
}
check_api_sanity() {
make
export CFLAGS="-Wall -ggdb2"
api-sanity-autotest -l libqb -d build-aux/api-auto-test.xml -gen -build -run
google-chrome test_results/libqb/master/test_results.html
google-chrome test_results/libqb/master/test_results.html
}
check_all() {
check_ansi
check_nosection
check_sysv
check_noepoll
check_nogettime
check_notimerfd
check_bsd
check_dist
check_rpm
}
case $command in
help)
help_all $args
;;
ansi)
check_ansi
;;
nosection)
check_nosection
;;
sysv)
check_sysv
;;
noepoll)
check_noepoll
;;
nogettime)
check_nogettime
;;
bsd)
check_bsd
;;
mac)
check_mac
;;
rpm)
check_rpm
;;
mock)
check_mock
;;
dist)
check_dist
;;
notimerfd)
check_notimerfd
;;
coverity)
check_coverity
;;
abi)
check_abi $args
;;
api_sanity)
check_api_sanity
;;
all)
check_all
;;
*)
help_all
;;
esac
cd -
exit 0
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Feb 24, 1:23 PM (13 h, 41 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1464228
Default Alt Text
(5 KB)
Attached To
Mode
rQ LibQB
Attached
Detach File
Event Timeline
Log In to Comment