summaryrefslogtreecommitdiff
path: root/t/distcom4.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2014-12-22 16:59:38 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2014-12-22 17:17:35 +0100
commit986a82e394ee7d8284e67e4d6bc3585daf485ac3 (patch)
tree12968066a4a040874912b7c9229a5373b77c67f3 /t/distcom4.sh
parentcfc6916ef499014b71e874924f1077e8c0604f89 (diff)
downloadautomake-986a82e394ee7d8284e67e4d6bc3585daf485ac3.tar.gz
tests: refactor some tests on DIST_COMMON
So that they prefer checking the semantics of the generated Makefiles, rather than grepping their content. This will be useful in an upcoming refactoring. * t/distcom-subdir.sh: Adjust this test. * t/distcom2.sh: And this. * t/distcom3.sh: And this. * t/distcom4.sh: And this. * t/distcom5.sh: And this. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/distcom4.sh')
-rw-r--r--t/distcom4.sh30
1 files changed, 9 insertions, 21 deletions
diff --git a/t/distcom4.sh b/t/distcom4.sh
index 3febb61e8..39b5b7179 100644
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,8 +43,13 @@ mkdir tests
: > README
: > tests/wrapper.in
cat > Makefile.am << 'END'
-.PHONY: test
-test: distdir
+.PHONY: test1 test 2
+test1:
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep 'tests/' > lst
+ cat lst # For debugging.
+ test `wc -l <lst` -eq 1
+test2: distdir
test -f $(distdir)/tests/wrapper.in
END
@@ -52,23 +57,6 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
-$MAKE test
-
-sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
-
-cat dc.txt # For debugging.
-
-test 1 -eq $(grep -c tests dc.txt)
-grep configure dc.txt
+$MAKE test1 test2
: