Files
wget2/contrib/check-hard
Ander Juaristi efeec48707 Remove references to autogen.sh. Set SKIP_PO.
* bootstrap.conf: add SKIP_PO=1, so that we don't have to pass
  the --skip-po flag every time we run bootstrap.
* README.md, contrib/check-hard, contrib/mingw, docs/mainpage.md,
  .travis.sh: amend references to autogen.sh.
* autogen.sh: Removed
* .gitignore: Add build-aux
* po/Makevars: Remove auto-generated file from repo
2016-07-08 16:11:01 +02:00

55 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
#
# Do some checking before 'git push'.
# Set a stricter bash mode
set -e
set -u
CORES=$(grep -c ^processor /proc/cpuinfo 2> /dev/null || echo 0)
if [ $CORES -lt 1 ]; then CORES=1; fi
echo "Running: make distclean"
make distclean > /dev/null || true
CFLAGS="-pedantic -O2 -g -Wall -Wextra -Wstrict-prototypes -Wold-style-definition -Wwrite-strings -Wshadow -Wformat -Wformat-security -Wunreachable-code -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
CACHEFILE=$PWD/config_check.cache
# measure time consumed and print it at the end of the script
START=$(date +%s.%N)
echo "Running: ./bootstrap"
./bootstrap > /dev/null
echo
for CC in gcc clang; do
export CC
echo "*** Testing with CC=$CC"
# the compiler changed, so we have to remove the cache file here
rm -f $CACHEFILE
for options in "" "--without-gnutls" "--disable-nls" "--disable-static" "--without-libnghttp2" "--without-zlib"; do
export DISTCHECK_CONFIGURE_FLAGS="-C --cache-file=$CACHEFILE $options"
echo " ./configure $DISTCHECK_CONFIGURE_FLAGS"
./configure $DISTCHECK_CONFIGURE_FLAGS CFLAGS="$CFLAGS" > /dev/null
for xVALGRIND in 0 1; do
for xLCALL in C tr_TR.utf8; do
export TESTS_ENVIRONMENT="LC_ALL=$xLCALL VALGRIND_TESTS=$xVALGRIND"
echo " TESTS_ENVIRONMENT=\"$TESTS_ENVIRONMENT\"" make check -j$CORES
make check -j$CORES > /dev/null
done
done
unset TESTS_ENVIRONMENT
export TESTS_ENVIRONMENT
echo " make distcheck CFLAGS=$CFLAGS -j$CORES"
make distcheck CFLAGS="$CFLAGS" -j$CORES > /dev/null
done
done
END=$(date +%s.%N)
echo "Duration: "$(echo "$END - $START" | bc)