123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- #! /bin/sh
- required=runtest
- . test-init.sh
- write_check_for ()
- {
- echo "send_user \"$1: \$$1\\n\""
- unindent << END
- if { \$$1 == "/$1/" } {
- pass "test_$1"
- } else {
- fail "test_$1"
- }
- END
- }
- cat >> configure.ac << 'END'
- AC_OUTPUT
- END
- cat > Makefile.am << 'END'
- AUTOMAKE_OPTIONS = dejagnu
- DEJATOOL = tool
- EXTRA_DIST = tool.test/tool.exp
- EXTRA_DEJAGNU_SITE_CONFIG = foo.exp
- EXTRA_DIST += foo.exp
- END
- echo 'set foo "/foo/"' > foo.exp
- mkdir tool.test
- write_check_for foo > tool.test/tool.exp
- cat tool.test/tool.exp
- $ACLOCAL
- $AUTOCONF
- $AUTOMAKE --add-missing
- ./configure
- $MAKE check
- cat foo.exp
- cat site.exp
- grep 'PASS: test_foo' tool.sum
- write_check_for bar >> tool.test/tool.exp
- write_check_for baz >> tool.test/tool.exp
- cat tool.test/tool.exp
- $sleep
- cat >> foo.exp <<'END'
- set bar "/foo/"
- set baz "/foo/"
- set qux "/foo/"
- END
- $MAKE check && { cat site.exp; exit 1; }
- grep 'PASS: test_foo' tool.sum
- grep 'FAIL: test_bar' tool.sum
- grep 'FAIL: test_baz' tool.sum
- cat >> Makefile.am << 'END'
- EXTRA_DEJAGNU_SITE_CONFIG += bar bar.dir/bar
- EXTRA_DIST += bar
- DISTCLEANFILES = bar.dir/bar
- bar.dir/bar:
- test -d bar.dir || mkdir bar.dir
- echo 'set baz "/baz/"' > $@
- END
- echo 'set bar "/bar/"' > bar
- echo 'set baz "/xyz/"' >> bar
- $sleep
- $AUTOMAKE Makefile
- ./config.status Makefile
- $MAKE check || { cat site.exp; exit 1; }
- cat site.exp
- cat bar.dir/bar
- $FGREP '/bar/' site.exp
- $FGREP '/baz/' site.exp
- grep 'PASS: test_foo' tool.sum
- grep 'PASS: test_bar' tool.sum
- grep 'PASS: test_baz' tool.sum
- $MAKE distcheck
- write_check_for zardoz >> tool.test/tool.exp
- cat tool.test/tool.exp
- echo 'set zardoz "/zardoz/"' >> site.exp
- $MAKE check
- cat site.exp
- grep 'PASS: test_zardoz' tool.sum
- cat >> Makefile.am << 'END'
- EXTRA_DEJAGNU_SITE_CONFIG += quux.exp
- quux.exp:
- echo 'set zardoz "/quux/"' > $@
- END
- $sleep
- $AUTOMAKE Makefile
- ./config.status Makefile
- grep 'zardoz.*/quux/' Makefile
- $MAKE site.exp
- cat site.exp
- cat quux.exp
- grep 'zardoz.*/quux/' site.exp
- $MAKE check
- grep 'PASS: test_zardoz' tool.sum
- grep 'zardoz: /zardoz/' tool.log
- grep 'zardoz.*quux' tool.log && exit 1
- $MAKE distdir
- ls -l $distdir
- test ! -e $distdir/bar.dir/bar
- test ! -e $distdir/quux.exp
- :
|