mctest 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/bin/sh
  2. # This is the testsuite for GNU Midnight Commander.
  3. # Maintainer doing the release must ensure that this testsuite passes.
  4. set -e
  5. distcheck() {
  6. id="$1"
  7. shift
  8. make distcheck MSGMERGE="msgmerge -q" "$@" >test-$id.out 2>test-$id.err
  9. }
  10. # Specify which warnings we want to see.
  11. # Don't add options that produce massive warnings.
  12. # Add -Wstrict-prototypes after main.h is fixed (always use cpanel).
  13. # Maybe add -W if a better way to initialize quick dialogs is found.
  14. export CFLAGS="-O2 -Wall -Wno-unused-parameter -Wno-sign-compare \
  15. -Wmissing-declarations -Wmissing-prototypes -Wbad-function-cast \
  16. -Wcast-align -Wpointer-arith -Wredundant-decls -Wundef -Wfloat-equal"
  17. # Suppress progress indicator
  18. export MSGMERGE="msgmerge --quiet"
  19. echo "Checking the documentation"
  20. maint/doctest
  21. echo "Bootstraping from CVS"
  22. ./autogen.sh >test-autogen.out 2>test-autogen.err
  23. echo "Checking configure"
  24. bash -n configure 2>test-configure.err
  25. echo "Making everything in the source directory"
  26. make all >test0.out 2>test0.err
  27. echo "Checking the default configuration"
  28. distcheck 1
  29. echo "Checking the configuration with maximal code coverage"
  30. distcheck 2 with_screen=mcslang enable_charset=yes with_samba=yes \
  31. with_mcfs=yes with_included_gettext=yes with_glib12=yes
  32. echo "Checking the configuration with minimal code coverage"
  33. distcheck 3 enable_largefile=no enable_nls=no with_vfs=no \
  34. with_gpm_mouse=no with_subshell=no with_edit=no with_ext2undel=no \
  35. with_screen=ncurses with_x=no enable_background=no
  36. echo "Checking the configuration with minimal code coverage + editor"
  37. distcheck 4 enable_largefile=no enable_nls=no with_vfs=no \
  38. with_gpm_mouse=no with_subshell=no with_ext2undel=no \
  39. with_screen=ncurses
  40. echo "Checking the configuration with experimental and rarely used options"
  41. distcheck 5 with_screen=mcslang with_termcap=yes \
  42. with_mmap=no with_subshell=optional enable_netcode=no
  43. RPMBUILD=/usr/bin/rpmbuild
  44. if test -x $RPMBUILD; then
  45. echo "Building RPM package"
  46. RPM_SRC_DIR="`pwd`/rpm"
  47. rm -rf $RPM_SRC_DIR
  48. mkdir "$RPM_SRC_DIR"
  49. mkdir "$RPM_SRC_DIR/BUILD"
  50. mkdir "$RPM_SRC_DIR/RPMS"
  51. mkdir "$RPM_SRC_DIR/RPMS/`$RPMBUILD --eval='%{_host_cpu}' 2>/dev/null`"
  52. mkdir "$RPM_SRC_DIR/SPECS"
  53. $RPMBUILD -tb --define="_topdir $RPM_SRC_DIR" mc-*.tar.gz >test-rpm.out 2>test-rpm.err
  54. else
  55. echo "rpmbuild not found"
  56. fi
  57. echo "All done. No fatal errors. Please check test*.err files."