]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: convert another test to TAP
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 11 Sep 2011 16:51:03 +0000 (18:51 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 11 Sep 2011 16:51:03 +0000 (18:51 +0200)
* tests/primary-prefix-invalid-couples.test: Renamed ...
* tests/primary-prefix-invalid-couples.tap: ... to this, and
converted to the use of the TAP protocols (this requires only
very minimal changes this time).
* tests/list-of-tests.mk: Update.

ChangeLog
tests/Makefile.in
tests/list-of-tests.mk
tests/primary-prefix-invalid-couples.tap [moved from tests/primary-prefix-invalid-couples.test with 92% similarity]

index de0fa2ce08ed856c008fcf1c71b789138fadcda5..9c191242ac43456a55a8606312f6e3bb4333793d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: convert another test to TAP
+       * tests/primary-prefix-invalid-couples.test: Renamed ...
+       * tests/primary-prefix-invalid-couples.tap: ... to this, and
+       converted to the use of the TAP protocols (this requires only
+       very minimal changes this time).
+       * tests/list-of-tests.mk: Update.
+
 2011-09-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix spurious failure on fast machines
index e9fa68d8a713b6f4b1ee92384dd6987455702c72..101a1930f5eb35e64997de14f9026d493ba7ced5 100644 (file)
@@ -1052,7 +1052,7 @@ prefix.test \
 primary.test \
 primary2.test \
 primary3.test \
-primary-prefix-invalid-couples.test \
+primary-prefix-invalid-couples.tap \
 primary-prefix-valid-couples.test \
 primary-prefix-couples-force-valid.test \
 primary-prefix-couples-documented-valid.test \
index 6cadef49c5ff3fde115633a4f1daea2642815357..2a27bd18b79663b9186ea9c5d2e65a836fb0f253 100644 (file)
@@ -736,7 +736,7 @@ prefix.test \
 primary.test \
 primary2.test \
 primary3.test \
-primary-prefix-invalid-couples.test \
+primary-prefix-invalid-couples.tap \
 primary-prefix-valid-couples.test \
 primary-prefix-couples-force-valid.test \
 primary-prefix-couples-documented-valid.test \
similarity index 92%
rename from tests/primary-prefix-invalid-couples.test
rename to tests/primary-prefix-invalid-couples.tap
index 479170703a42f3e9ed62fde2674dbc0ba76bbdc5..b51fca367a2aaf29429ca1e63f5d3e6a3f1d686b 100755 (executable)
@@ -22,6 +22,8 @@
 
 . ./defs || Exit 1
 
+plan_ "later"
+
 oIFS=$IFS # Saved for later.
 
 : > ltmain.sh
@@ -40,7 +42,7 @@ AM_PATH_PYTHON
 AM_PATH_LISPDIR
 END
 
-$ACLOCAL
+$ACLOCAL || fatal_ "aclocal failure"
 
 # Please keep this list in sync with the list of "Directory Variables"
 # in the GNU Coding Standards and with the list additional directory
@@ -163,14 +165,18 @@ cat Makefile.am
 
 set -x # Restore shell xtraces from now on.
 
-AUTOMAKE_fails -a
+AUTOMAKE_fails \
+  -d "'automake -a' error out on mismatched prefix/primary couples" \
+  -- --add-missing
 
 while read lineno prefix primary; do
   test -n "$prefix" && test -n "$primary" && test 0 -lt $lineno \
     || fatal_ "internal error in 'all.list'"
   grep "^${prefix}_${primary}$" allow.list >/dev/null && continue
   errmsg_rx=".*${prefix}dir.* not a legitimate directory .*$primary"
-  grep "^Makefile\\.am:$lineno: $errmsg_rx" stderr || Exit 1
+  command_ok_ \
+    "mismatched prefix/primary in ${prefix}_${primary}" \
+    grep "^Makefile\\.am:$lineno: $errmsg_rx" stderr
 done <all.list
 
 # Check that automake really failed only for the expected reason(s).
@@ -179,7 +185,8 @@ grep -v 'dir.* not a legitimate directory' stderr && Exit 1
 # Check that the same failures are present without the `--add-missing'
 # option.
 mv stderr stderr.old
-AUTOMAKE_fails
-diff stderr.old stderr
+AUTOMAKE_fails -d "automake error out on mismatched prefix/primary couples"
+command_ok_ "... and with the same diagnostic of 'automake -a'" \
+            diff stderr.old stderr
 
 :