automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-196-g8f126ed
Date: Sun, 12 Oct 2008 20:09:59 +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=8f126edc167f035c6f9b9fd7607e7dfa77f33e60

The branch, master has been updated
       via  8f126edc167f035c6f9b9fd7607e7dfa77f33e60 (commit)
      from  ac378dbab6e987358622b449cf6dfe859dc99db7 (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 8f126edc167f035c6f9b9fd7607e7dfa77f33e60
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 cff858f..d2cfdbc 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 43bbe90..2c52e82 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -239,23 +239,36 @@ check-TESTS: $(TESTS)
            fi; \
            echo "$${col}$$res$${std}: $$tst"; \
          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 daae5a2..ca400fe 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -86,24 +86,37 @@ check-TESTS: $(TESTS)
            echo "$${col}$$res$${std}: $$tst"; \
          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 7f9ff9f..cc95743 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -96,6 +96,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 5ceb18f..9eec016 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -248,6 +248,7 @@ check6.test \
 check7.test \
 check8.test \
 check9.test \
+check10.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -898,23 +899,36 @@ check-TESTS: $(TESTS)
            fi; \
            echo "$${col}$$res$${std}: $$tst"; \
          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..c817dcb
--- /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]