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 5EA6F6DE0941 for ; Sat, 21 Oct 2017 04:58:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.019 X-Spam-Level: X-Spam-Status: No, score=0.019 tagged_above=-999 required=5 tests=[AWL=0.039, 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 quWA9FsYsc-J for ; Sat, 21 Oct 2017 04:58:07 -0700 (PDT) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by arlo.cworth.org (Postfix) with ESMTPS id 635DA6DE0350 for ; Sat, 21 Oct 2017 04:58:07 -0700 (PDT) Received: by mail-lf0-f47.google.com with SMTP id d10so15644460lfg.11 for ; Sat, 21 Oct 2017 04:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=Aq7algid6qy+dKgyz/n2uIez49d7Vak9TXTNVq3VNmQ=; b=dUXCg6EXvT+EYW4yfrTyOhudi7bea0yZwtm1hQk0BZL0EANLDFjX4fv9Tur23NeMvg 3zj1o37DBnyO6JMctHtBRkiglXOerJqTDNrwqbE0lKqBjVAcp8uYeZ7B/5LjcMOnmPoa SA775dlWIhPh1H1KalzN1wDzLrtdpK5XvGdpnbnGpRrai2VQbUbaPkIlbgfl2IxvrOeO RS1OqWpfQcmNj7DqsSS2UxaZTSEUajhMl8omH9gFhWIqq+eMo5ffii5EklHLqjQXK1ro /SpC4hS4XQp2LTHyGplMsm8SOaFetrghiSTbFJUFUbKKWrOmvT+XagJkhnWl6g8ouZwi 2XDw== 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:date:message-id:in-reply-to :references; bh=Aq7algid6qy+dKgyz/n2uIez49d7Vak9TXTNVq3VNmQ=; b=WovZXudHOQbYPLiaQWh5hXAf5mha92uJzZxx2qQtwy8QILPwj0fFST/saHAat9QcSZ uTeU/0h/veLcVh5LQKIf3RmgzpagWYh2ERLkrO+BILcUOX7pcCJ2pGQ7BTywP/erIHFO xaJc8EkaHS5IiJJVdKqq6Ihsn0+d9TkGYpN2hBPBL9Mug2B11YUwiStrBn/ZA1Gmhbgz VlVKBH56Ml8WEDokmhkp2JnOCzaImsa+KZQcIgrbIx+wMO2JZ3BGXADs30/GPwXzndh4 3qLjZaq/NG1Q9jx+ty3lP/d2xZOEsPrnCsvek3k3fYDq1OjX/XYxx/MJOqQ88I5I5NNU GFzQ== X-Gm-Message-State: AMCzsaXYrP8zqO9EpOYg81o1wNK0xAgExvUjRTiqw/dXzxOPpoJx5woB jQ/lx1QX1jC6psxmpD4NHWOF5X3W0C4= X-Google-Smtp-Source: ABhQp+Qxg6f/bPblQtqqRrFxx/oeX/aIPMB2OP+dpMa5+AX4dbCb3zQTlrbEYT4R7tScKrJD6DxK+A== X-Received: by 10.46.88.73 with SMTP id x9mr3338733ljd.80.1508587085681; Sat, 21 Oct 2017 04:58:05 -0700 (PDT) Received: from localhost (mobile-access-5d6a0c-19.dhcp.inet.fi. [93.106.12.19]) by smtp.gmail.com with ESMTPSA id d13sm573089lfl.8.2017.10.21.04.58.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2017 04:58:05 -0700 (PDT) From: Jani Nikula To: David Bremner , Jani Nikula , notmuch@notmuchmail.org Subject: [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup Date: Sat, 21 Oct 2017 14:58:02 +0300 Message-Id: <20171021115802.31197-1-jani@nikula.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <878tg59qmw.fsf@tethera.net> References: <878tg59qmw.fsf@tethera.net> 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, 21 Oct 2017 11:58:08 -0000 The primary motivation here is to fix TMP_DIRECTORY cleanup prior to running each test when the current working directory is not the test subdirectory. Tests with failures would leave their TMP_DIRECTORY directory behind for debugging, and repeated out-of-tree test runs would have old temp directories. (This lead to e.g. T310-emacs.sh hanging because emacs would prompt for overwriting files.) We remove the likely anyway defunct --root test option while at it, just to be on the safe side when doing 'rm -rf' on the TMP_DIRECTORY. --- test/README | 9 --------- test/test-lib-common.sh | 8 ++------ test/test-lib.sh | 3 --- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/test/README b/test/README index 8e06f44241a6..b378c3ff3c5f 100644 --- a/test/README +++ b/test/README @@ -80,15 +80,6 @@ The following command-line options are available when running tests: As the names depend on the tests' file names, it is safe to run the tests with this option in parallel. ---root=:: - This runs the testsuites specified under a separate directory. - However, caution is advised, as not all tests are maintained - with this relocation in mind, so some tests may behave - differently. - - Pointing this argument at a tmpfs filesystem can improve the - speed of the test suite for some users. - Certain tests require precomputed databases to complete. You can fetch these databases with diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 5e53348a9438..4300eb65418f 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -307,13 +307,9 @@ export PATH MANPATH # Test repository test="tmp.$(basename "$0" .sh)" -test -n "$root" && test="$root/$test" -case "$test" in -/*) TMP_DIRECTORY="$test" ;; - *) TMP_DIRECTORY="$TEST_DIRECTORY/$test" ;; -esac +TMP_DIRECTORY="$TEST_DIRECTORY/$test" test ! -z "$debug" || remove_tmp=$TMP_DIRECTORY -rm -fr "$test" || { +rm -rf "$TMP_DIRECTORY" || { GIT_EXIT_OK=t echo >&6 "FATAL: Cannot prepare test area" exit 1 diff --git a/test/test-lib.sh b/test/test-lib.sh index 4619c327dd02..7926d2787710 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -160,9 +160,6 @@ do valgrind=t; verbose=t; shift ;; --tee) shift ;; # was handled already - --root=*) - root=$(expr "z$1" : 'z[^=]*=\(.*\)') - shift ;; *) echo "error: unknown test option '$1'" >&2; exit 1 ;; esac -- 2.11.0