[PATCH 2/3] test: print empty line at the beginning of test script, not at end
authorTomi Ollila <tomi.ollila@iki.fi>
Mon, 25 Nov 2013 17:08:18 +0000 (19:08 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:28 +0000 (09:58 -0800)
68/90559b35e70d2889981a34d73e87a154c87746 [new file with mode: 0644]

diff --git a/68/90559b35e70d2889981a34d73e87a154c87746 b/68/90559b35e70d2889981a34d73e87a154c87746
new file mode 100644 (file)
index 0000000..ee6b1f5
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <too@guru-group.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id B1111431E64\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Nov 2013 09:08:40 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id MlkgFY7NpFcC for <notmuch@notmuchmail.org>;\r
+       Mon, 25 Nov 2013 09:08:34 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id D63D5431FD0\r
+       for <notmuch@notmuchmail.org>; Mon, 25 Nov 2013 09:08:33 -0800 (PST)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 3EB4E100064; Mon, 25 Nov 2013 19:08:28 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/3] test: print empty line at the beginning of test script,\r
+       not at end\r
+Date: Mon, 25 Nov 2013 19:08:18 +0200\r
+Message-Id: <1385399299-12936-2-git-send-email-tomi.ollila@iki.fi>\r
+X-Mailer: git-send-email 1.8.0\r
+In-Reply-To: <1385399299-12936-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1384288868-23903-1-git-send-email-tomi.ollila@iki.fi>\r
+       <1385399299-12936-1-git-send-email-tomi.ollila@iki.fi>\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 25 Nov 2013 17:08:40 -0000\r
+\r
+In preparation for quiet mode print empty line before writing the\r
+test description. This is done now in function designed for it --\r
+it will also be called when test fails.\r
+---\r
+ test/notmuch-test                          |  1 +\r
+ test/test-lib.sh                           | 12 +++++++++---\r
+ test/test.expected-output/test-verbose-no  |  1 +\r
+ test/test.expected-output/test-verbose-yes |  1 +\r
+ 4 files changed, 12 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/notmuch-test b/test/notmuch-test\r
+index 18593f6..d6fdd3a 100755\r
+--- a/test/notmuch-test\r
++++ b/test/notmuch-test\r
+@@ -96,10 +96,11 @@ for test in $TESTS; do\r
+     fi\r
+ done\r
+ trap - HUP INT TERM\r
\r
+ # Report results\r
++echo\r
+ ./aggregate-results.sh test-results/*\r
+ ev=$?\r
\r
+ # Clean up\r
+ rm -rf test-results corpus.mail\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index 6e47545..34e0db6 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -188,11 +188,19 @@ if test "$help" = "t"\r
+ then\r
+       echo "Tests ${test_description}"\r
+       exit 0\r
+ fi\r
\r
+-echo $this_test: "Testing ${test_description}"\r
++test_description_printed=\r
++print_test_description ()\r
++{\r
++      test -z "$test_description_printed" || return 0\r
++      echo\r
++      echo $this_test: "Testing ${test_description}"\r
++      test_description_printed=1\r
++}\r
++print_test_description\r
\r
+ exec 5>&1\r
\r
+ test_failure=0\r
+ test_count=0\r
+@@ -977,12 +985,10 @@ test_done () {\r
+       echo "fixed $test_fixed" >> $test_results_path\r
+       echo "broken $test_broken" >> $test_results_path\r
+       echo "failed $test_failure" >> $test_results_path\r
+       echo "" >> $test_results_path\r
\r
+-      echo\r
+-\r
+       [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'\r
\r
+       if [ "$test_failure" = "0" ]; then\r
+           if [ "$test_broken" = "0" ]; then\r
+               rm -rf "$remove_tmp"\r
+diff --git a/test/test.expected-output/test-verbose-no b/test/test.expected-output/test-verbose-no\r
+index 0bca754..1a2ff61 100644\r
+--- a/test/test.expected-output/test-verbose-no\r
++++ b/test/test.expected-output/test-verbose-no\r
+@@ -1,5 +1,6 @@\r
++\r
+ test-verbose: Testing the verbosity options of the test framework itself.\r
+  PASS   print something in test_expect_success and pass\r
+  FAIL   print something in test_expect_success and fail\r
+       \r
+         echo "hello stdout" &&\r
+diff --git a/test/test.expected-output/test-verbose-yes b/test/test.expected-output/test-verbose-yes\r
+index ebe5187..d25466e 100644\r
+--- a/test/test.expected-output/test-verbose-yes\r
++++ b/test/test.expected-output/test-verbose-yes\r
+@@ -1,5 +1,6 @@\r
++\r
+ test-verbose: Testing the verbosity options of the test framework itself.\r
+ hello stdout\r
+ hello stderr\r
+  PASS   print something in test_expect_success and pass\r
+ hello stdout\r
+-- \r
+1.8.4.2\r
+\r