2002-10-07 10:38:58 +04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
# This is the testsuite for GNU Midnight Commander.
|
2002-10-07 10:38:58 +04:00
|
|
|
# Maintainer doing the release must ensure that this testsuite passes.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2005-11-11 08:57:46 +03:00
|
|
|
trap 'echo >&2 "ERROR: Test not completed, exit with code $?"; exit 1' exit
|
|
|
|
|
2003-11-21 01:07:06 +03:00
|
|
|
distcheck() {
|
2003-10-26 05:58:58 +03:00
|
|
|
id="$1"
|
|
|
|
shift
|
2005-11-16 01:41:59 +03:00
|
|
|
make distcheck "$MAKEFLAGS" "$@" >test-$id.out 2>test-$id.err
|
2003-10-26 05:58:58 +03:00
|
|
|
}
|
|
|
|
|
2002-11-15 10:01:32 +03:00
|
|
|
# Specify which warnings we want to see.
|
|
|
|
# Don't add options that produce massive warnings.
|
|
|
|
# Add -Wstrict-prototypes after main.h is fixed (always use cpanel).
|
|
|
|
# Maybe add -W if a better way to initialize quick dialogs is found.
|
|
|
|
export CFLAGS="-O2 -Wall -Wno-unused-parameter -Wno-sign-compare \
|
2005-11-11 06:05:18 +03:00
|
|
|
-Wmissing-declarations -Wmissing-prototypes -Wbad-function-cast \
|
|
|
|
-Wcast-align -Wpointer-arith -Wredundant-decls -Wundef -Wfloat-equal"
|
2002-11-15 10:01:32 +03:00
|
|
|
|
2003-10-26 05:58:58 +03:00
|
|
|
# Suppress progress indicator
|
2005-11-16 01:14:44 +03:00
|
|
|
MAKEFLAGS='MSGMERGE_FLAGS=--no-location --quiet'
|
2003-10-26 05:58:58 +03:00
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Checking the documentation"
|
|
|
|
maint/doctest
|
|
|
|
|
|
|
|
echo "Bootstraping from CVS"
|
2002-10-24 21:15:26 +04:00
|
|
|
./autogen.sh >test-autogen.out 2>test-autogen.err
|
2002-11-05 21:12:48 +03:00
|
|
|
|
|
|
|
echo "Checking configure"
|
|
|
|
bash -n configure 2>test-configure.err
|
|
|
|
|
|
|
|
echo "Making everything in the source directory"
|
2002-10-24 21:15:26 +04:00
|
|
|
make all >test0.out 2>test0.err
|
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Checking the default configuration"
|
2003-10-26 05:58:58 +03:00
|
|
|
distcheck 1
|
2002-10-07 10:38:58 +04:00
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Checking the configuration with maximal code coverage"
|
2009-01-10 23:04:30 +03:00
|
|
|
distcheck 2 enable_charset=yes with_samba=yes \
|
2003-10-26 05:58:58 +03:00
|
|
|
with_mcfs=yes with_included_gettext=yes with_glib12=yes
|
2002-10-07 10:38:58 +04:00
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Checking the configuration with minimal code coverage"
|
2003-10-26 05:58:58 +03:00
|
|
|
distcheck 3 enable_largefile=no enable_nls=no with_vfs=no \
|
2002-10-07 10:38:58 +04:00
|
|
|
with_gpm_mouse=no with_subshell=no with_edit=no with_ext2undel=no \
|
2003-10-26 05:58:58 +03:00
|
|
|
with_screen=ncurses with_x=no enable_background=no
|
2002-10-07 10:38:58 +04:00
|
|
|
|
2002-12-04 10:04:00 +03:00
|
|
|
echo "Checking the configuration with minimal code coverage + editor"
|
2003-10-26 05:58:58 +03:00
|
|
|
distcheck 4 enable_largefile=no enable_nls=no with_vfs=no \
|
2002-12-04 10:04:00 +03:00
|
|
|
with_gpm_mouse=no with_subshell=no with_ext2undel=no \
|
2003-10-26 05:58:58 +03:00
|
|
|
with_screen=ncurses
|
2002-12-04 10:04:00 +03:00
|
|
|
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Checking the configuration with experimental and rarely used options"
|
2009-01-10 23:04:30 +03:00
|
|
|
distcheck 5 with_termcap=yes \
|
2003-10-29 11:18:15 +03:00
|
|
|
with_mmap=no with_subshell=optional enable_netcode=no
|
2002-10-24 20:57:42 +04:00
|
|
|
|
2005-05-11 05:55:50 +04:00
|
|
|
RPMBUILD=/usr/bin/rpmbuild
|
|
|
|
if test -x $RPMBUILD; then
|
2002-11-05 21:12:48 +03:00
|
|
|
echo "Building RPM package"
|
2005-05-11 05:55:50 +04:00
|
|
|
RPM_SRC_DIR="`pwd`/rpm"
|
|
|
|
rm -rf $RPM_SRC_DIR
|
|
|
|
mkdir "$RPM_SRC_DIR"
|
|
|
|
mkdir "$RPM_SRC_DIR/BUILD"
|
|
|
|
mkdir "$RPM_SRC_DIR/RPMS"
|
2005-11-11 06:05:18 +03:00
|
|
|
mkdir "$RPM_SRC_DIR/RPMS/`$RPMBUILD --eval='%{_host_cpu}' 2>/dev/null`"
|
2005-05-11 05:55:50 +04:00
|
|
|
mkdir "$RPM_SRC_DIR/SPECS"
|
2005-05-11 06:46:36 +04:00
|
|
|
$RPMBUILD -tb --define="_topdir $RPM_SRC_DIR" mc-*.tar.gz >test-rpm.out 2>test-rpm.err
|
2002-10-24 20:57:42 +04:00
|
|
|
else
|
|
|
|
echo "rpmbuild not found"
|
|
|
|
fi
|
2002-11-11 21:15:28 +03:00
|
|
|
|
2005-11-11 08:57:46 +03:00
|
|
|
trap - exit
|
2002-11-11 21:15:28 +03:00
|
|
|
echo "All done. No fatal errors. Please check test*.err files."
|