From: Tomi Ollila Date: Wed, 13 Apr 2016 05:35:03 +0000 (+0300) Subject: [PATCH 1/2] test-lib.sh: renamed die() to die_exit() and added generic die() function X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=255989397781c3406e48628ee2daa3c4a43655db;p=notmuch-archives.git [PATCH 1/2] test-lib.sh: renamed die() to die_exit() and added generic die() function --- diff --git a/55/bbf9f17547d727aa726e09b8776373d787a04b b/55/bbf9f17547d727aa726e09b8776373d787a04b new file mode 100644 index 000000000..696b9cbc7 --- /dev/null +++ b/55/bbf9f17547d727aa726e09b8776373d787a04b @@ -0,0 +1,86 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 6AB7D6DE01C2 + for ; Tue, 12 Apr 2016 22:35:17 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.288 +X-Spam-Level: +X-Spam-Status: No, score=0.288 tagged_above=-999 required=5 tests=[AWL=0.297, + HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-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 xfVkQATrxETB for ; + Tue, 12 Apr 2016 22:35:07 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id 27AB76DE01F9 + for ; Tue, 12 Apr 2016 22:35:06 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 2E3E91001A3; Wed, 13 Apr 2016 08:35:06 +0300 (EEST) +From: Tomi Ollila +To: notmuch@notmuchmail.org +Cc: tomi.ollila@iki.fi +Subject: [PATCH 1/2] test-lib.sh: renamed die() to die_exit() and added + generic die() function +Date: Wed, 13 Apr 2016 08:35:03 +0300 +Message-Id: <1460525704-15145-1-git-send-email-tomi.ollila@iki.fi> +X-Mailer: git-send-email 2.6.4 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 13 Apr 2016 05:35:17 -0000 + +The generic die function is now usable in future changes. +--- + test/test-lib.sh | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/test/test-lib.sh b/test/test-lib.sh +index ac04b15a96ba..5620b8cef553 100644 +--- a/test/test-lib.sh ++++ b/test/test-lib.sh +@@ -229,7 +229,7 @@ _die_common () { + rm -rf "$TEST_TMPDIR" + } + +-die () { ++die_exit () { + _die_common + if test -n "$GIT_EXIT_OK" + then +@@ -250,10 +250,19 @@ die_signal () { + exit $code + } + ++die () { ++ _die_common ++ say_color error '%-6s' FATAL ++ echo " $*" ++ echo ++ echo "Unexpected exit while executing $0." ++ exit 1 ++} ++ + GIT_EXIT_OK= + # Note: TEST_TMPDIR *NOT* exported! + TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX") +-trap 'die' EXIT ++trap 'die_exit' EXIT + trap 'die_signal' HUP INT TERM + + test_decode_color () { +-- +2.6.4 +