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