123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- #! /bin/sh
- . test-init.sh
- cat >> configure.ac <<END
- AC_OUTPUT
- END
- cat > Makefile.am << 'END'
- TEST_EXTENSIONS = .sh .test
- TESTS = foo.test bar.sh sub/zardoz.test
- TEST_LOG_COMPILER = $(SHELL)
- SH_LOG_COMPILER = $(SHELL)
- tb:
- $(am__set_TESTS_bases); echo "$$bases" > $@
- END
- cat > foo.test << 'END'
- #! /bin/sh
- exit $FOO_STATUS
- END
- : > bar.sh
- mkdir sub
- : > sub/zardoz.test
- FOO_STATUS=0; export FOO_STATUS
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE -a
- for vpath in : false; do
- if $vpath; then
- srcdir=..
- mkdir build
- cd build
- else
- srcdir=.
- fi
- $srcdir/configure
- $MAKE tb
- test x"$(cat tb)" = x"foo bar sub/zardoz"
- rm -f tb
-
- run_make TESTS='foo.test foo2.sh foo-log foolog.test a.log.b.sh 0.exe' tb
- test x"$(cat tb)" = x"foo foo2 foo-log foolog a.log.b 0.exe"
- rm -f tb
- cd $srcdir
- done
- : > unrelated.trs
- : > sub/foo.trs
- $MAKE check
- test -f foo.trs
- test -f bar.trs
- test -f sub/zardoz.trs
- $MAKE clean
- test ! -e foo.trs
- test ! -e bar.trs
- test ! -e sub/zardoz.trs
- test -f unrelated.trs
- test -f sub/foo.trs
- FOO_STATUS=1 $MAKE check && exit 1
- test -f foo.trs
- test -f bar.trs
- test -f sub/zardoz.trs
- $MAKE mostlyclean
- test ! -e foo.trs
- test ! -e bar.trs
- test ! -e sub/zardoz.trs
- test -f unrelated.trs
- test -f sub/foo.trs
- run_make TESTS=foo.test check
- test -f foo.trs
- test ! -e bar.trs
- test ! -e sub/zardoz.trs
- $MAKE clean
- test ! -e foo.trs
- run_make TESTS='foo.test bar.sh' check
- test -f foo.trs
- test -f bar.trs
- test ! -e sub/zardoz.trs
- run_make TESTS=bar.sh clean
- test -f foo.trs
- test ! -e bar.trs
- $MAKE clean
- run_make TEST_LOGS=sub/zardoz.log check
- test ! -e foo.trs
- test ! -e bar.trs
- test -f sub/zardoz.trs
- $MAKE clean
- test ! -e sub/zardoz.trs
- run_make TEST_LOGS='foo.log bar.log' check
- test -f foo.trs
- test -f bar.trs
- test ! -e sub/zardoz.trs
- run_make TEST_LOGS=foo.log clean
- test ! -e foo.trs
- test -f bar.trs
- test ! -e sub/zardoz.trs
- :
|