X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=67ad88539e393a1c5c4858a55631d83bab7631c5;hb=814abafc3e4280de115d4bc0ac01f8d026a0a7f9;hp=0bca76df217afbb062ac2157eefd3206b5cb196e;hpb=f2533b9e730c12276c32abe7126d7eabc7fcb8c6;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index 0bca76df..67ad8853 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -131,10 +131,13 @@ add_gnupg_home () { # Change this if we ship a new test key FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381" SELF_USERID="Notmuch Test Suite (INSECURE!)" + SELF_EMAIL="test_suite@notmuchmail.org" printf '%s:6:\n' "$FINGERPRINT" | gpg --quiet --batch --no-tty --import-ownertrust } add_gpgsm_home () { + test_require_external_prereq openssl + local fpr [ -e "$GNUPGHOME/gpgsm.conf" ] && return _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } @@ -858,15 +861,16 @@ test_when_finished () { test_done () { GIT_EXIT_OK=t test_results_dir="$TEST_DIRECTORY/test-results" - mkdir -p "$test_results_dir" + test -d "$test_results_dir" || mkdir "$test_results_dir" test_results_path="$test_results_dir/$this_test" - echo "total $test_count" >> $test_results_path - echo "success $test_success" >> $test_results_path - 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 + printf %s\\n \ + "success $test_success" \ + "fixed $test_fixed" \ + "broken $test_broken" \ + "failed $test_failure" \ + "total $test_count" \ + > $test_results_path [ -n "$EMACS_SERVER" ] && test_emacs '(kill-emacs)'