test-driver-custom-no-extra-driver.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #! /bin/sh
  2. # Copyright (C) 2011-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Check that auxiliary script 'test-driver' doesn't get needlessly
  17. # installed or referenced if it's not used, i.e., if the user has
  18. # defined his own '*LOG_DRIVER' variables.
  19. . test-init.sh
  20. cat >> configure.ac <<'END'
  21. AC_PROG_CC
  22. AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
  23. AC_SUBST([X_LOG_DRIVER], [none])
  24. AC_OUTPUT
  25. END
  26. mkdir sub1 sub2
  27. cat > Makefile.am <<'END'
  28. SUBDIRS = sub1 sub2
  29. LOG_DRIVER =
  30. TEST_LOG_DRIVER = :
  31. TESTS = foo bar.test
  32. END
  33. cat > sub1/Makefile.am <<'END'
  34. TEST_EXTENSIONS = .x .sh .pl
  35. SH_LOG_DRIVER = dummy1
  36. PL_LOG_DRIVER = dummy2
  37. TESTS = a.pl b.sh c.x
  38. END
  39. cat > sub2/Makefile.am <<'END'
  40. TEST_EXTENSIONS = .bar
  41. LOG_DRIVER = x
  42. BAR_LOG_DRIVER = y
  43. TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
  44. check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
  45. END
  46. $ACLOCAL
  47. for opts in '' '--add-missing' '-a -c'; do
  48. $AUTOMAKE $opts
  49. $FGREP test-driver Makefile.in sub[12]/Makefile.in && exit 1
  50. find . | $FGREP test-driver && exit 1
  51. : For shells with busted 'set -e'.
  52. done
  53. :