Ticket #2111: allow pause in copy/move/delete file operation.
[midnight-commander.git] / maint / mctest
blob1ba0e7d23a75eb9051bd569737c3b99f892a58ae
1 #!/bin/sh
3 # This is the testsuite for GNU Midnight Commander.
4 # Maintainer doing the release must ensure that this testsuite passes.
6 set -e
8 trap 'echo >&2 "ERROR: Test not completed, exit with code $?"; exit 1' exit
10 distcheck() {
11 id="$1"
12 shift
13 make distcheck "$MAKEFLAGS" "$@" >test-$id.out 2>test-$id.err
16 # Specify which warnings we want to see.
17 # Don't add options that produce massive warnings.
18 # Add -Wstrict-prototypes after main.h is fixed (always use cpanel).
19 # Maybe add -W if a better way to initialize quick dialogs is found.
20 export CFLAGS="-O2 -Wall -Wno-unused-parameter -Wno-sign-compare \
21 -Wmissing-declarations -Wmissing-prototypes -Wbad-function-cast \
22 -Wcast-align -Wpointer-arith -Wredundant-decls -Wundef -Wfloat-equal"
24 # Suppress progress indicator
25 MAKEFLAGS='MSGMERGE_FLAGS=--no-location --quiet'
27 echo "Checking the documentation"
28 maint/doctest
30 echo "Bootstraping from CVS"
31 ./autogen.sh >test-autogen.out 2>test-autogen.err
33 echo "Checking configure"
34 bash -n configure 2>test-configure.err
36 echo "Making everything in the source directory"
37 make all >test0.out 2>test0.err
39 echo "Checking the default configuration"
40 distcheck 1
42 echo "Checking the configuration with maximal code coverage"
43 distcheck 2 enable_charset=yes with_samba=yes \
44 with_included_gettext=yes
46 echo "Checking the configuration with minimal code coverage"
47 distcheck 3 enable_largefile=no enable_nls=no with_vfs=no \
48 with_gpm_mouse=no with_subshell=no with_edit=no with_ext2undel=no \
49 with_screen=ncurses with_x=no enable_background=no
51 echo "Checking the configuration with minimal code coverage + editor"
52 distcheck 4 enable_largefile=no enable_nls=no with_vfs=no \
53 with_gpm_mouse=no with_subshell=no with_ext2undel=no \
54 with_screen=ncurses
56 echo "Checking the configuration with experimental and rarely used options"
57 distcheck 5 with_mmap=no with_subshell=optional
59 RPMBUILD=/usr/bin/rpmbuild
60 if test -x $RPMBUILD; then
61 echo "Building RPM package"
62 RPM_SRC_DIR="`pwd`/rpm"
63 rm -rf $RPM_SRC_DIR
64 mkdir "$RPM_SRC_DIR"
65 mkdir "$RPM_SRC_DIR/BUILD"
66 mkdir "$RPM_SRC_DIR/RPMS"
67 mkdir "$RPM_SRC_DIR/RPMS/`$RPMBUILD --eval='%{_host_cpu}' 2>/dev/null`"
68 mkdir "$RPM_SRC_DIR/SPECS"
69 $RPMBUILD -tb --define="_topdir $RPM_SRC_DIR" mc-*.tar.gz >test-rpm.out 2>test-rpm.err
70 else
71 echo "rpmbuild not found"
74 trap - exit
75 echo "All done. No fatal errors. Please check test*.err files."