parallel-tests-suffix.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #! /bin/sh
  2. # Copyright (C) 2009-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 parallel-tests features:
  17. # - suffix rules
  18. # See also sister test 'parallel-tests-suffix-prog.sh'.
  19. . test-init.sh
  20. cat >> configure.ac << 'END'
  21. AC_OUTPUT
  22. END
  23. cat > Makefile.am << 'END'
  24. ## Note that automake should not match the '/test' part
  25. ## of 'sub/test' as '.test' suffix.
  26. TESTS = foo.chk bar.test baz bli.suff sub/test
  27. TEST_EXTENSIONS = .chk .test
  28. EXTRA_DIST = $(TESTS)
  29. END
  30. mkdir sub
  31. cat >foo.chk << 'END'
  32. #! /bin/sh
  33. exit 0
  34. END
  35. chmod a+x foo.chk
  36. cp foo.chk bar.test
  37. cp foo.chk baz
  38. cp foo.chk bli.suff
  39. cp foo.chk sub/test
  40. $ACLOCAL
  41. $AUTOCONF
  42. $AUTOMAKE -a
  43. ./configure
  44. $MAKE check
  45. ls -l . sub
  46. test -f foo.log
  47. test -f bar.log
  48. test -f baz.log
  49. test -f bli.suff.log
  50. test -f sub/test.log
  51. $MAKE distcheck
  52. :