automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {testsuite-work} maintcheck: fix spurious failures


From: Stefano Lattarini
Subject: [FYI] {testsuite-work} maintcheck: fix spurious failures
Date: Thu, 8 Sep 2011 18:44:53 +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                |   14 ++++++++++++++
 Makefile.am              |   12 +++++++++---
 Makefile.in              |   10 +++++++---
 tests/Makefile.am        |    2 --
 tests/Makefile.in        |    2 --
 tests/gen-testsuite-part |    6 ++++--
 6 files changed, 34 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 41a650c..1e287a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-09-08  Stefano Lattarini  <address@hidden>
+
+       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  <address@hidden>
 
        aclocal: more granularity in acdir overriding
diff --git a/Makefile.am b/Makefile.am
index 3b1751a..10d2de2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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; \
diff --git a/Makefile.in b/Makefile.in
index d0611e4..1c8f2f0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fe6ad55..ad80a1c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
diff --git a/tests/Makefile.in b/tests/Makefile.in
index db46cf1..f794eb4 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -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
diff --git a/tests/gen-testsuite-part b/tests/gen-testsuite-part
index 56e9227..fc21487 100755
--- a/tests/gen-testsuite-part
+++ b/tests/gen-testsuite-part
@@ -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
 }
 
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]