From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id EEC8D6DE0B14 for ; Sat, 23 Sep 2017 08:38:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.036 X-Spam-Level: X-Spam-Status: No, score=0.036 tagged_above=-999 required=5 tests=[AWL=0.056, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ira4Mu6AB9gt for ; Sat, 23 Sep 2017 08:38:15 -0700 (PDT) Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by arlo.cworth.org (Postfix) with ESMTPS id C72566DE096A for ; Sat, 23 Sep 2017 08:38:14 -0700 (PDT) Received: by mail-lf0-f66.google.com with SMTP id y15so1985475lfd.0 for ; Sat, 23 Sep 2017 08:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=yzVdVjBwwBKqPZRvnaJmzZTSwLqL5HQTpmPZcP2dTxc=; b=H+M+shnIJxkyRiCbDEoWwNHzBzL8WxQFSyxnFBt2uPTk1/K28UOxtaCb1/3iL8oJ79 xf5f/aHwb9kv7PembNLFHPEbLsTmBSZi+RWTcaH/11NNXZOSHxjFKEfKEmnuzWrF8LPo 2xwP8mcPCo777/w6EicyJyzoGFbgJCgXN78vUqPSifOMlX0+TZA35bcl2b2ZoBU+lRl9 mztWHj+CsPcNPitV1WLRVlxv6U6HZi5bIeRm3XAsDtgP1zj47xYLAJ1s21msxfYCMxRx VbRryWc2QzjqLEc/NAvMGOLUXkCdfOSRte5ele7uGaicCYXpL6lDOWPkywGWgw1JrQO6 hGqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=yzVdVjBwwBKqPZRvnaJmzZTSwLqL5HQTpmPZcP2dTxc=; b=jzE8yZcpAiLWCf11ND3L31HM615eoWFUCapsXIugh0PLFrJ+NVc/T3ZIkI3vOCi3A8 mDN0sDsG03flTur1x0QjUoSdPAmtP22BPpuodsOa0+fBvogydajsQiAM35lAoJkAbLet 0UswFBZpJbshagRUgH92tYy1bo0TpldTxj3gPGuy+BYzr2xKPgSkFdHk0K+lEMrHz7KY p+ZHE3lZ6HZRQpY+vnnJFJJY0Ps1c+52NP8uSbk/thSMIGqeF5RU6K7pQyQWe87NxJsK n3Nw+d0/jkAQ+wTayMgEpWuF0TTgc3B6R1k6q1xwkTakGGUWvAxRjXeVqhJJ4Qn68UZv S4rg== X-Gm-Message-State: AHPjjUig4GlnmPi91EhxhWJjtxrNTBuNX4nVNnTvDz7M7GkTCQ5yGCzL vckK8hOVyF/9TNTwfEupF+7FAQ== X-Google-Smtp-Source: AOwi7QCQIRuTUSkCuGHTi2H00V0Kcx1r8UVEzhy7hSocKsLQUfAq/fo6ClVE42dxX+x/dvKBpYszpw== X-Received: by 10.25.209.133 with SMTP id i127mr728122lfg.127.1506181092167; Sat, 23 Sep 2017 08:38:12 -0700 (PDT) Received: from localhost (mobile-access-5d6a60-234.dhcp.inet.fi. [93.106.96.234]) by smtp.gmail.com with ESMTPSA id m129sm345831lfg.33.2017.09.23.08.38.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 08:38:11 -0700 (PDT) From: Jani Nikula To: Daniel Kahn Gillmor , Notmuch Mail Subject: Re: [PATCH v2 03/10] tests: prepare for more crypto tests (using add_gnupg_home) In-Reply-To: <20170915055359.24123-4-dkg@fifthhorseman.net> References: <20170912230153.4175-10-dkg@fifthhorseman.net> <20170915055359.24123-1-dkg@fifthhorseman.net> <20170915055359.24123-4-dkg@fifthhorseman.net> Date: Sat, 23 Sep 2017 18:38:10 +0300 Message-ID: <87wp4pfmsd.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 23 Sep 2017 15:38:16 -0000 On Fri, 15 Sep 2017, Daniel Kahn Gillmor wrote: > Move add_gnupg_home to test-lib.sh to prepare it for reuse. > --- > test/T350-crypto.sh | 17 ----------------- > test/test-lib.sh | 15 +++++++++++++++ > 2 files changed, 15 insertions(+), 17 deletions(-) > > diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh > index 1d408af7..e1b8fd83 100755 > --- a/test/T350-crypto.sh > +++ b/test/T350-crypto.sh > @@ -7,23 +7,6 @@ > test_description='PGP/MIME signature verification and decryption' > . ./test-lib.sh || exit 1 > > -add_gnupg_home () > -{ > - local output > - [ -d ${GNUPGHOME} ] && return > - _gnupg_exit () { gpgconf --kill all 2>/dev/null || true; } > - at_exit_function _gnupg_exit The above lines get dropped. Rebase fail? BR, Jani. > - mkdir -m 0700 "$GNUPGHOME" > - gpg --no-tty --import <$TEST_DIRECTORY/gnupg-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 > - elif (gpg --debug-quick-random --version >/dev/null 2>&1) ; then > - echo debug-quick-random >> "$GNUPGHOME"/gpg.conf > - fi > - echo no-emit-version >> "$GNUPGHOME"/gpg.conf > -} > - > ################################################## > > add_gnupg_home > diff --git a/test/test-lib.sh b/test/test-lib.sh > index 35024649..b8427d97 100644 > --- a/test/test-lib.sh > +++ b/test/test-lib.sh > @@ -93,6 +93,21 @@ unset GREP_OPTIONS > # For emacsclient > unset ALTERNATE_EDITOR > > +add_gnupg_home () > +{ > + local output > + [ -d ${GNUPGHOME} ] && return > + mkdir -m 0700 "$GNUPGHOME" > + gpg --no-tty --import <$TEST_DIRECTORY/gnupg-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 > + elif (gpg --debug-quick-random --version >/dev/null 2>&1) ; then > + echo debug-quick-random >> "$GNUPGHOME"/gpg.conf > + fi > + echo no-emit-version >> "$GNUPGHOME"/gpg.conf > +} > + > # Each test should start with something like this, after copyright notices: > # > # test_description='Description of this test... > -- > 2.14.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch