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 2FD37431FD0 for ; Thu, 10 Nov 2011 11:35:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 U8UHGbJ59-kr for ; Thu, 10 Nov 2011 11:35:05 -0800 (PST) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id BB79B431FB6 for ; Thu, 10 Nov 2011 11:35:05 -0800 (PST) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 6A6D166E0237 for ; Thu, 10 Nov 2011 11:35:05 -0800 (PST) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (cpe-76-174-136-149.socal.res.rr.com [76.174.136.149]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id A4C2166E02DA for ; Thu, 10 Nov 2011 11:35:03 -0800 (PST) Received: by finestructure.net (Postfix, from userid 1000) id B407B350; Thu, 10 Nov 2011 11:35:02 -0800 (PST) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH] test: Use env to set TMPDIR when running emacs in screen. Date: Thu, 10 Nov 2011 11:35:02 -0800 Message-Id: <1320953702-16732-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.7.1 In-Reply-To: <20111110192836.GN2658@mit.edu> References: <20111110192836.GN2658@mit.edu> 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: Thu, 10 Nov 2011 19:35:06 -0000 This is to get around a bug where screen unsets TMPDIR. This causes problems for users who set TMPDIR to something other than it's default (/tmp). --- This just adds some comments over the previous patch. Thanks to Austin Clements for the suggestion. test/test-lib.sh | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index c81c709..5ed6a96 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -844,7 +844,12 @@ test_emacs () { if [ -z "$EMACS_SERVER" ]; then EMACS_SERVER="notmuch-test-suite-$$" # start a detached screen session with an emacs server - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \ + # The emacs server places its socket in TMPDIR, but ld.so unsets + # TMPDIR when loading setgid binaries like screen, so we must + # explicitly pass TMPDIR through to emacs. + screen -S "$EMACS_SERVER" -d -m \ + env TMPDIR="$TMPDIR" \ + "$TMP_DIRECTORY/run_emacs" \ --no-window-system \ --eval "(setq server-name \"$EMACS_SERVER\")" \ --eval '(server-start)' \ -- 1.7.7.1