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 ACC34431FB6 for ; Wed, 1 Dec 2010 12:28:38 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 1lQJrUL4aZsu for ; Wed, 1 Dec 2010 12:28:38 -0800 (PST) Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com [209.85.215.181]) by olra.theworths.org (Postfix) with ESMTP id 9B519431FB5 for ; Wed, 1 Dec 2010 12:28:37 -0800 (PST) Received: by eyb6 with SMTP id 6so4396064eyb.26 for ; Wed, 01 Dec 2010 12:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=1MPGwTLaLBv6y1z+FI4wk4LnIRRfv3g/SFOYNo6oVRo=; b=Y7Ly6bFiW9Q+uYZSyDo/9YVNBSH4Vq4JzkpfaR6V/ztMw4XmoaRkvCRz7bbvK8BoUF QqC3jhdGZmQhyuXPvygr1ro192O9kaWx8sKk/9rfs6zXeJmAPwJkemGDvIpz3QA4kRHM iEGQnjfAbJ2LM3H5ZZTQX8dCL5CfryyzGuZxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:mime-version:content-type :content-transfer-encoding; b=tW8WHCFDeJytd3xBXjMI90YQKCQYPPk2aIJR8beGCYcc0sCXG0hZumZn6z+M5+RcDp E9A8OALAs6klLY4Sf4o4oJmEZj2GBwr8hebgNqbDWknEp6oUwQminZosTrBnGPp+MLXF xx3n/UUT1DSabCPXNFjtxvUwKOALaG+v2PNjE= Received: by 10.14.48.12 with SMTP id u12mr7966951eeb.34.1291235314270; Wed, 01 Dec 2010 12:28:34 -0800 (PST) Received: from localhost.localdomain (c80-216-237-236.bredband.comhem.se [80.216.237.236]) by mx.google.com with ESMTPS id y5sm52871eeh.22.2010.12.01.12.28.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Dec 2010 12:28:33 -0800 (PST) From: =?UTF-8?q?Joel=20Borggr=C3=A9n-Franck?= To: notmuch@notmuchmail.org Subject: [PATCH] test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portability Date: Wed, 1 Dec 2010 21:27:52 +0100 Message-Id: <1291235272-16335-1-git-send-email-joel.borggren.franck@gmail.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Wed, 01 Dec 2010 20:28:38 -0000 From: Joel Borggrén-Franck Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way systems running on bash < 4 can prepend bash >= 4 to path before running the tests. --- test/README | 6 +++--- test/aggregate-results.sh | 2 +- test/author-order | 2 +- test/basic | 2 +- test/dump-restore | 2 +- test/emacs | 2 +- test/encoding | 2 +- test/from-guessing | 2 +- test/json | 2 +- test/long-id | 2 +- test/maildir-sync | 2 +- test/new | 2 +- test/notmuch-test | 2 +- test/raw | 2 +- test/reply | 2 +- test/search | 2 +- test/search-output | 2 +- test/test-lib.sh | 2 +- test/test-verbose | 2 +- test/thread-naming | 2 +- test/thread-order | 2 +- test/uuencode | 2 +- test/valgrind/valgrind.sh | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/test/README b/test/README index ebaa3cf..07da480 100644 --- a/test/README +++ b/test/README @@ -68,11 +68,11 @@ remaining tests to be unaffected. Writing Tests ------------- -The test script is written as a shell script. It should start -with the standard "#!/bin/bash" with copyright notices, and an +The test script is written as a shell script. It should start with +the standard "#!/usr/bin/env bash" with copyright notices, and an assignment to variable 'test_description', like this: - #!/bin/bash + #!/usr/bin/env bash # # Copyright (c) 2005 Junio C Hamano # diff --git a/test/aggregate-results.sh b/test/aggregate-results.sh index 0f1ea33..732d6ca 100755 --- a/test/aggregate-results.sh +++ b/test/aggregate-results.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash fixed=0 success=0 diff --git a/test/author-order b/test/author-order index 9f0b931..2d79873 100755 --- a/test/author-order +++ b/test/author-order @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="author reordering;" . ./test-lib.sh diff --git a/test/basic b/test/basic index 309779c..e20e994 100755 --- a/test/basic +++ b/test/basic @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2005 Junio C Hamano # diff --git a/test/dump-restore b/test/dump-restore index 0d78f01..a4de370 100755 --- a/test/dump-restore +++ b/test/dump-restore @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="\"notmuch dump\" and \"notmuch restore\"" . ./test-lib.sh diff --git a/test/emacs b/test/emacs index 75dec89..baa6f3d 100755 --- a/test/emacs +++ b/test/emacs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="emacs interface" . test-lib.sh diff --git a/test/encoding b/test/encoding index 68cb8ee..673b039 100755 --- a/test/encoding +++ b/test/encoding @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="encoding issues" . ./test-lib.sh diff --git a/test/from-guessing b/test/from-guessing index 6744e68..d8727bb 100755 --- a/test/from-guessing +++ b/test/from-guessing @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="From line heuristics (with multiple configured addresses)" . ./test-lib.sh diff --git a/test/json b/test/json index 7fe2a27..1978f8b 100755 --- a/test/json +++ b/test/json @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="--format=json output" . ./test-lib.sh diff --git a/test/long-id b/test/long-id index 84f9294..85e620f 100755 --- a/test/long-id +++ b/test/long-id @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="messages with ridiculously-long message IDs" . ./test-lib.sh diff --git a/test/maildir-sync b/test/maildir-sync index 50a5b8e..2b43127 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="maildir synchronization" diff --git a/test/new b/test/new index 7b396ae..1b7296e 100755 --- a/test/new +++ b/test/new @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description='"notmuch new" in several variations' . ./test-lib.sh diff --git a/test/notmuch-test b/test/notmuch-test index 43565e8..d753c81 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Run tests # diff --git a/test/raw b/test/raw index 4ed237c..b7e265a 100755 --- a/test/raw +++ b/test/raw @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr//bin/env bash test_description='notmuch show --format=raw' . ./test-lib.sh diff --git a/test/reply b/test/reply index 99c3376..c0b8e26 100755 --- a/test/reply +++ b/test/reply @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="\"notmuch reply\" in several variations" . ./test-lib.sh diff --git a/test/search b/test/search index b180c7f..2085fe6 100755 --- a/test/search +++ b/test/search @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description='"notmuch search" in several variations' . ./test-lib.sh diff --git a/test/search-output b/test/search-output index b414993..ef870bf 100755 --- a/test/search-output +++ b/test/search-output @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description='various settings for "notmuch search --output="' . ./test-lib.sh diff --git a/test/test-lib.sh b/test/test-lib.sh index 04a4c14..89c9a4c 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2005 Junio C Hamano # diff --git a/test/test-verbose b/test/test-verbose index f29a9c7..4100c05 100755 --- a/test/test-verbose +++ b/test/test-verbose @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description='the verbosity options of the test framework itself.' diff --git a/test/thread-naming b/test/thread-naming index bcc3d61..41b97d9 100755 --- a/test/thread-naming +++ b/test/thread-naming @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="naming of threads with changing subject" . ./test-lib.sh diff --git a/test/thread-order b/test/thread-order index 1819fce..6c3a4b3 100755 --- a/test/thread-order +++ b/test/thread-order @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="threading when messages received out of order" . ./test-lib.sh diff --git a/test/uuencode b/test/uuencode index d509320..d0d16bd 100755 --- a/test/uuencode +++ b/test/uuencode @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash test_description="handling of uuencoded data" . ./test-lib.sh diff --git a/test/valgrind/valgrind.sh b/test/valgrind/valgrind.sh index 3bc90f5..78700c0 100755 --- a/test/valgrind/valgrind.sh +++ b/test/valgrind/valgrind.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash base=$(basename "$0") -- 1.7.3.2