automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, branch-1-10, updated. Relea


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1-10, updated. Release-1-10-1-41-g6ad62ff
Date: Sun, 12 Oct 2008 20:09:57 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=6ad62fff9f41424b39d88a55ebdf5b5e507fc22b

The branch, branch-1-10 has been updated
       via  6ad62fff9f41424b39d88a55ebdf5b5e507fc22b (commit)
      from  6cd8e8589a53a097d8d32c205448b729daa00f22 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6ad62fff9f41424b39d88a55ebdf5b5e507fc22b
Author: William Pursell <address@hidden>
Date:   Sun Oct 12 21:51:18 2008 +0200

    Fix grammar w.r.t. plurals in test reports.
    
    * lib/am/check.am: Fix singular/plural forms in test reports.
    * tests/check10.test: New test.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    8 ++++
 lib/Automake/tests/Makefile.in |   23 ++++++++--
 lib/am/check.am                |   23 ++++++++--
 tests/Makefile.am              |    1 +
 tests/Makefile.in              |   24 +++++++++--
 tests/check10.test             |   87 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 151 insertions(+), 15 deletions(-)
 create mode 100755 tests/check10.test

diff --git a/ChangeLog b/ChangeLog
index a9be4f9..9ec1d64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-12  William Pursell <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Fix grammar w.r.t. plurals in test reports.
+       * lib/am/check.am: Fix singular/plural forms in test reports.
+       * tests/check10.test: New test.
+       * tests/Makefile.am: Update.
+
 2008-10-08  Ralf Wildenhues  <address@hidden>
 
        Require texi2dvi in tests, makeinfo may not be enough.
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 7bea62c..49fe6a6 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -218,23 +218,36 @@ check-TESTS: $(TESTS)
              echo "SKIP: $$tst"; \
            fi; \
          done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
          if test "$$failed" -eq 0; then \
            if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
+             banner="$$All$$all $$tests passed"; \
            else \
-             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+             if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
            fi; \
          else \
            if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
+             banner="$$failed of $$all $$tests failed"; \
            else \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; 
fi; \
+             banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
            fi; \
          fi; \
          dashes="$$banner"; \
          skipped=""; \
          if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
            test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
              dashes="$$skipped"; \
          fi; \
diff --git a/lib/am/check.am b/lib/am/check.am
index a886741..4915ab0 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -65,24 +65,37 @@ check-TESTS: $(TESTS)
            fi; \
          done; \
 ## Prepare the banner
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
          if test "$$failed" -eq 0; then \
            if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
+             banner="$$All$$all $$tests passed"; \
            else \
-             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+             if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
            fi; \
          else \
            if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
+             banner="$$failed of $$all $$tests failed"; \
            else \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; 
fi; \
+             banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
            fi; \
          fi; \
 ## DASHES should contain the largest line of the banner.
          dashes="$$banner"; \
          skipped=""; \
          if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
            test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
              dashes="$$skipped"; \
          fi; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 42da071..cf27cd9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -91,6 +91,7 @@ check6.test \
 check7.test \
 check8.test \
 check9.test \
+check10.test \
 checkall.test \
 clean.test \
 clean2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index eec4ecf..e7dd983 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -224,6 +224,7 @@ check6.test \
 check7.test \
 check8.test \
 check9.test \
+check10.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -845,23 +846,36 @@ check-TESTS: $(TESTS)
              echo "SKIP: $$tst"; \
            fi; \
          done; \
+         if test "$$all" -eq 1; then \
+           tests="test"; \
+           All=""; \
+         else \
+           tests="tests"; \
+           All="All "; \
+         fi; \
          if test "$$failed" -eq 0; then \
            if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
+             banner="$$All$$all $$tests passed"; \
            else \
-             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+             if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
+             banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
            fi; \
          else \
            if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
+             banner="$$failed of $$all $$tests failed"; \
            else \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
+             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; 
fi; \
+             banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
            fi; \
          fi; \
          dashes="$$banner"; \
          skipped=""; \
          if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
+           if test "$$skip" -eq 1; then \
+             skipped="($$skip test was not run)"; \
+           else \
+             skipped="($$skip tests were not run)"; \
+           fi; \
            test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
              dashes="$$skipped"; \
          fi; \
diff --git a/tests/check10.test b/tests/check10.test
new file mode 100755
index 0000000..1332765
--- /dev/null
+++ b/tests/check10.test
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 2008  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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check singular and plural in test summaries.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = fail pass skip xfail xpass fail2 pass2 skip2 xfail2 xpass2
+XFAIL_TESTS = xfail xpass xfail2 xpass2
+END
+
+cat >>pass <<'END'
+#! /bin/sh
+exit 0
+END
+cat >>fail <<'END'
+#! /bin/sh
+exit 1
+END
+cat >>skip <<'END'
+#! /bin/sh
+exit 77
+END
+chmod a+x pass fail skip
+cp pass pass2
+cp pass xpass
+cp xpass xpass2
+cp fail xfail
+cp fail fail2
+cp xfail xfail2
+cp skip skip2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+unset TESTS || :
+
+./configure
+(
+  # Do not check for failure in this subshell
+  set +e
+  env TESTS=pass $MAKE -e check
+  env TESTS=fail $MAKE -e check
+  env TESTS=skip $MAKE -e check
+  env TESTS=xfail $MAKE -e check
+  env TESTS=xpass $MAKE -e check
+  env TESTS="pass pass2" $MAKE -e check
+  env TESTS="fail fail2" $MAKE -e check
+  env TESTS="skip skip2" $MAKE -e check
+  env TESTS="xfail xfail2" $MAKE -e check
+  env TESTS="xpass xpass2" $MAKE -e check
+  env TESTS='pass skip xfail' $MAKE -e check
+  $MAKE check
+) >stdout
+cat stdout
+
+grep '1 [tT]ests' stdout && exit 1
+grep '^[^1]* [tT]est ' stdout && exit 1
+grep '1 .* were ' stdout && exit 1
+grep '^[^1]* was' stdout && exit 1
+grep 'All 1 ' stdout && exit 1
+grep '^ .*[tT]est' stdout && exit 1
+$EGREP '1 (un)?expected (failures|passes)' stdout && exit 1
+$EGREP '[^1] (un)?expected (failure|pass)\)' stdout && exit 1
+
+:


hooks/post-receive
--
GNU Automake




reply via email to

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