parallel-tests-exeext.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # parallel-tests:
  17. # - check2.am and interaction with $(EXEEXT)
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. dnl We need to fool the init.m4 internals a little.
  21. AC_DEFUN([_AM_FOO],
  22. [m4_provide([_AM_COMPILER_EXEEXT])
  23. AC_SUBST([CC], [false])
  24. AC_SUBST([EXEEXT])])
  25. _AM_FOO
  26. AC_OUTPUT
  27. END
  28. cat > Makefile.am << 'END'
  29. TESTS = x y a.test b.test
  30. LOG_COMPILER = true
  31. TEST_LOG_COMPILER = true
  32. ## We also need to fool the automake internals a little.
  33. EXTRA_PROGRAMS = y
  34. y_SOURCES =
  35. END
  36. $ACLOCAL
  37. $AUTOCONF
  38. $AUTOMAKE -a
  39. $EGREP 'EXEEXT|\.log|\.test' Makefile.in # For debugging.
  40. ./configure EXEEXT=
  41. touch x y a.test b.test
  42. $MAKE check
  43. $MAKE distclean
  44. rm -f x y a.test b.test *.log *.trs
  45. ./configure EXEEXT=.bin
  46. touch x y.bin a.test b.test.bin
  47. $MAKE check
  48. ls -l # For debugging.
  49. test -f y.log
  50. test ! -e y.bin.log
  51. test -f b.log
  52. test ! -e b.test.log
  53. $EGREP '^y\.log: y(\$\(EXEEXT\)|\.bin)' Makefile
  54. $EGREP '^\.test(\$\(EXEEXT\)|\.bin)\.log:' Makefile
  55. :