X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2Ftest-lib.sh;h=1a6525dfa0e0d508b5289ad67f77dba8809e1cb9;hb=f4dc32e71b6fbaca933e0c7edd6d08b65feed0ec;hp=e9f32582e38e99c32c0eb04b59d5725b7ed5d034;hpb=6219e7380ae34cc0c8142f4174bee3cde9bf9662;p=notmuch diff --git a/test/test-lib.sh b/test/test-lib.sh index e9f32582..1a6525df 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -71,7 +71,7 @@ add_gnupg_home () { _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } at_exit_function _gnupg_exit mkdir -p -m 0700 "$GNUPGHOME" - gpg --no-tty --import <$NOTMUCH_SRCDIR/test/gnupg-secret-key.asc >"$GNUPGHOME"/import.log 2>&1 + gpg --no-tty --import <$NOTMUCH_SRCDIR/test/openpgp4-secret-key.asc >"$GNUPGHOME"/import.log 2>&1 test_debug "cat $GNUPGHOME/import.log" if (gpg --quick-random --version >/dev/null 2>&1) ; then echo quick-random >> "$GNUPGHOME"/gpg.conf @@ -81,8 +81,8 @@ add_gnupg_home () { echo no-emit-version >> "$GNUPGHOME"/gpg.conf # Change this if we ship a new test key - FINGERPRINT="5AEAB11F5E33DCE875DDB75B6D92612D94E46381" - SELF_USERID="Notmuch Test Suite (INSECURE!)" + FINGERPRINT="9A3AFE6C60065A148FD4B58A7E6ABE924645CC60" + SELF_USERID="Notmuch Test Suite (INSECURE!) " SELF_EMAIL="test_suite@notmuchmail.org" printf '%s:6:\n' "$FINGERPRINT" | gpg --quiet --batch --no-tty --import-ownertrust } @@ -522,6 +522,7 @@ notmuch_json_show_sanitize () { -e 's|"id": "[^"]*",|"id": "XXXXX",|g' \ -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \ -e 's|"filename": "signature.asc",||g' \ + -e 's|"duplicate": 1,||g' \ -e 's|"filename": \["/[^"]*"\],|"filename": \["YYYYY"\],|g' \ -e 's|"timestamp": 97.......|"timestamp": 42|g' \ -e 's|"content-length": [1-9][0-9]*|"content-length": "NONZERO"|g' @@ -532,6 +533,7 @@ notmuch_sexp_show_sanitize () { -e 's|:id "[^"]*"|:id "XXXXX"|g' \ -e 's|:Date "Sat, 01 Jan 2000 [^"]*0000"|:Date "GENERATED_DATE"|g' \ -e 's|:filename "signature.asc"||g' \ + -e 's|:duplicate 1 ||g' \ -e 's|:filename ("/[^"]*")|:filename ("YYYYY")|g' \ -e 's|:timestamp 9........|:timestamp 42|g' \ -e 's|:content-length [1-9][0-9]*|:content-length "NONZERO"|g' @@ -738,6 +740,12 @@ test_subtest_known_broken () { test_subtest_known_broken_=t } +test_subtest_broken_for_root () { + if [ "$EUID" = "0" ]; then + test_subtest_known_broken_=t + fi +} + test_expect_success () { exec 1>&6 2>&7 # Restore stdout and stderr if [ -z "$inside_subtest" ]; then