From: Tomi Ollila Date: Mon, 25 Nov 2013 17:08:18 +0000 (+0200) Subject: test: print empty line at the beginning of test script, not at end X-Git-Tag: 0.18_rc0~214 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=f05e7f3ce50b5762a56406b29012b25e2d1329b2;hp=5985438e057b51404208458fceadd03aae13eb80 test: print empty line at the beginning of test script, not at end 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. --- diff --git a/test/notmuch-test b/test/notmuch-test index 18593f61..d6fdd3a5 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -98,6 +98,7 @@ done trap - HUP INT TERM # Report results +echo ./aggregate-results.sh test-results/* ev=$? diff --git a/test/test-lib.sh b/test/test-lib.sh index 6e475452..34e0db68 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -190,7 +190,15 @@ then 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 @@ -979,8 +987,6 @@ test_done () { echo "failed $test_failure" >> $test_results_path echo "" >> $test_results_path - echo - [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)' if [ "$test_failure" = "0" ]; then diff --git a/test/test.expected-output/test-verbose-no b/test/test.expected-output/test-verbose-no index 0bca7540..1a2ff619 100644 --- a/test/test.expected-output/test-verbose-no +++ b/test/test.expected-output/test-verbose-no @@ -1,3 +1,4 @@ + 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 diff --git a/test/test.expected-output/test-verbose-yes b/test/test.expected-output/test-verbose-yes index ebe51874..d25466e9 100644 --- a/test/test.expected-output/test-verbose-yes +++ b/test/test.expected-output/test-verbose-yes @@ -1,3 +1,4 @@ + test-verbose: Testing the verbosity options of the test framework itself. hello stdout hello stderr