]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use same framework as other tests.
authorJim Meyering <jim@meyering.net>
Sun, 22 Dec 1996 14:12:06 +0000 (14:12 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 22 Dec 1996 14:12:06 +0000 (14:12 +0000)
tests/md5sum/Makefile.am

index 2c04f08270b6e8220d6cf4e77140b74d46bf28ed..10256cfe4522e95d096167846f29127d812a27df 100644 (file)
@@ -1,4 +1,44 @@
 ## Process this file with automake to produce Makefile.in.
 
-TESTS = md5-rfc
-EXTRA_DIST = $(TESTS)
+##test-files-begin
+x = md5sum
+explicit =
+maint_gen = t1.in t1.exp t2.in t2.exp t3.in t3.exp t4.in t4.exp t5.in t5.exp \
+t6.in t6.exp t7.in t7.exp
+run_gen = t1.out t1.err t2.out t2.err t3.out t3.err t4.out t4.err t5.out \
+t5.err t6.out t6.err t7.out t7.err
+##test-files-end
+
+EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
+noinst_SCRIPTS = $x-tests
+
+PERL = @PERL@
+editpl = sed -e 's,@''PERL''@,$(PERL),g' -e 's,@''srcdir''@,@srcdir@,g'
+
+TESTS = $x-tests
+
+$x-tests: @MAINT@mk-script Test.pm
+       ./mk-script ../../src/$x > $@.n
+       mv $@.n $@
+       chmod 755 $@
+
+SUFFIXES = .pl
+
+.pl:
+       rm -f $@ $@.tmp
+       $(editpl) $< > $@.tmp
+       chmod +x-w $@.tmp
+       mv $@.tmp $@
+
+MAINTAINERCLEANFILES = $x-tests $(maint_gen)
+CLEANFILES = $(run_gen)
+
+@MAINT@rebuild-check: Test.pm mk-script
+@MAINT@        rb=rb-check; rm -f $rb; \
+@MAINT@        m_template=../Makefile.am.in; \
+@MAINT@        sed -n '1,/^##test-files-begin/p' $$m_template > $$rb; \
+@MAINT@        tool=`echo $(subdir)|sed 's/^tests.//;s/-test//'`; \
+@MAINT@        echo "x = $$tool" >> $$rb; \
+@MAINT@        ./mk-script --list >> $$rb; \
+@MAINT@        sed -n '/^##test-files-end/,$$p' $$m_template >> $$rb; \
+@MAINT@        diff -u Makefile.am $$rb && echo ok || echo no