]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
maintcheck: fix spurious failures
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 8 Sep 2011 16:44:07 +0000 (18:44 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 8 Sep 2011 16:44:07 +0000 (18:44 +0200)
* tests/gen-testsuite-part (write_wrapper_script): More uses of
creative quoting in the generated tests, to avoid triggering
failures in the `sc_tests_Exit_not_exit' maintcheck.
* Makefile.am (sc_tests_tap_plan): It's OK for auto-generated
TAP tests that sources an hand-written one not to declare a TAP
plan: the sourced test will do so.
* tests/Makefile.am (checked_test_extensions): Don't define
anymore, the default value `$(TEST_EXTENSIONS)' is correct now.
(expected_list_of_tests): Don't define anymore, the default
value `$(TESTS)' is correct now.

ChangeLog
Makefile.am
Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/gen-testsuite-part

index 41a650cfca46152df3c320aee09746940d45caa5..1e287a25e4c42d37d9657a8236aeb5cb6e561504 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-09-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       maintcheck: fix spurious failures
+       * tests/gen-testsuite-part (write_wrapper_script): More uses of
+       creative quoting in the generated tests, to avoid triggering
+       failures in the `sc_tests_Exit_not_exit' maintcheck.
+       * Makefile.am (sc_tests_tap_plan): It's OK for auto-generated
+       TAP tests that sources an hand-written one not to declare a TAP
+       plan: the sourced test will do so.
+       * tests/Makefile.am (checked_test_extensions): Don't define
+       anymore, the default value `$(TEST_EXTENSIONS)' is correct now.
+       (expected_list_of_tests): Don't define anymore, the default
+       value `$(TESTS)' is correct now.
+
 2011-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        aclocal: more granularity in acdir overriding
index 3b1751a602e8ca8b915ac536dfef7b312deb7142..10d2de238d968555cee94e1062852fc929a5eb21 100644 (file)
@@ -548,10 +548,16 @@ sc_tests_tap_plan:
         with_plan=`echo $$with_plan`; \
         ok=:; \
         for t in $(srcdir)/tests/*.tap; do \
-          case " $$with_plan " in \
-            *" $$t "*) ;; \
-            *) ok=false; echo $$t;; \
+          case " $$with_plan " in *" $$t "*) continue;; esac; \
+## It's ok for an *auto-generated* test sourcing an hand-written one not
+## to declare a TAP plan: that will be done by the sourced test.
+          case $$t in \
+            *-w.tap) \
+              t2=`echo $$t | sed -e 's|.*/||' -e 's/-w\.tap$$/.tap/'` \
+                && grep -E "^ *\\.  *[^        ]*/$$t2\\b" $$t >/dev/null \
+                && continue || : ;; \
           esac; \
+          ok=false; echo $$t; \
         done; \
         $$ok || { \
          echo 'The tests above do not declare a TAP plan.' 1>&2; \
index d0611e40165bc5693e7f0fe9b6e5001b851fead6..1c8f2f0a1bdfaa5bc3ed3f3e51976c04cf0c8a54 100644 (file)
@@ -1278,10 +1278,14 @@ sc_tests_tap_plan:
         with_plan=`echo $$with_plan`; \
         ok=:; \
         for t in $(srcdir)/tests/*.tap; do \
-          case " $$with_plan " in \
-            *" $$t "*) ;; \
-            *) ok=false; echo $$t;; \
+          case " $$with_plan " in *" $$t "*) continue;; esac; \
+          case $$t in \
+            *-w.tap) \
+              t2=`echo $$t | sed -e 's|.*/||' -e 's/-w\.tap$$/.tap/'` \
+                && grep -E "^ *\\.  *[^        ]*/$$t2\\b" $$t >/dev/null \
+                && continue || : ;; \
           esac; \
+          ok=false; echo $$t; \
         done; \
         $$ok || { \
          echo 'The tests above do not declare a TAP plan.' 1>&2; \
index fe6ad55ba0103dc41b532e1616ada9b9c938971b..ad80a1ca49e1ab0cb0f936ff43b8b3ab35b87265 100644 (file)
@@ -120,8 +120,6 @@ check-local: check-no-repeated-test-name
 .PHONY: check-no-repeated-test-name
 
 ## Checking the list of tests.
-checked_test_extensions = .test .tap
-expected_list_of_tests = $(handwritten_TESTS)
 include $(top_srcdir)/CheckListOfTests.am
 
 clean-local: clean-local-check
index db46cf1a84605eb64699cbcf303ee633ec6eb83d..f794eb44769ecec7f79d897646ce5d2b986d3cac 100644 (file)
@@ -1484,8 +1484,6 @@ generated_TESTS = ar-lib-w.test compile-w.test compile2-w.test \
        tap-diagnostic-custom-w.test tap-driver-stderr-w.test \
        tap-doc-w.test tap-more-w.test tap-more2-w.test \
        tap-recheck-w.test
-checked_test_extensions = .test .tap
-expected_list_of_tests = $(handwritten_TESTS)
 am__tmk = tests-in-makefile-list.tmp
 am__tfs = tests-on-filesystem-list.tmp
 am__tdf = diff-in-tests-lists.tmp
index 56e92272f7f953bc84466eb24d40dd97fe3bc35e..fc21487ebc5a2f087bc86cc2fd5d6ecf6f0b369f 100755 (executable)
@@ -95,11 +95,13 @@ sub write_wrapper_script ($$$)
     for dir in . "\$testsrcdir"; do
       if test -f "\$dir/$wrapped_test"; then
         echo "\$0: will source \$dir/$wrapped_test"
-        . "\$dir/$wrapped_test"; exit \$?
+        # FIXME: creative quoting to please maintainer-check.
+        . "\$dir/$wrapped_test"; exit "\$?"
       fi
     done
     echo "\$0: cannot find wrapped test \\`$wrapped_test'" >&2
-    exit 99
+    # FIXME: creative quoting to please maintainer-check.
+    exit '99'
 EOF
 }