summaryrefslogtreecommitdiff
path: root/tests/md5sum
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-12-22 14:12:06 +0000
committerJim Meyering <jim@meyering.net>1996-12-22 14:12:06 +0000
commit8e02fb10abc47c6880b45dfee305bedbad8a5ec2 (patch)
tree0b16791fda8622ff0cf8cc8f420536594d757136 /tests/md5sum
parent1b47ed271434cea6ebdb28f799b49b6c0b40dc99 (diff)
downloadcoreutils-8e02fb10abc47c6880b45dfee305bedbad8a5ec2.tar.xz
Use same framework as other tests.
Diffstat (limited to 'tests/md5sum')
-rw-r--r--tests/md5sum/Makefile.am44
1 files changed, 42 insertions, 2 deletions
diff --git a/tests/md5sum/Makefile.am b/tests/md5sum/Makefile.am
index 2c04f0827..10256cfe4 100644
--- a/tests/md5sum/Makefile.am
+++ b/tests/md5sum/Makefile.am
@@ -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