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 5232F6DE01BE for ; Thu, 9 Jun 2016 12:21:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.242 X-Spam-Level: X-Spam-Status: No, score=0.242 tagged_above=-999 required=5 tests=[AWL=0.251, 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 NCDgWdn_tVkt for ; Thu, 9 Jun 2016 12:21:18 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id CFBC86DE01C2 for ; Thu, 9 Jun 2016 12:21:17 -0700 (PDT) Received: by guru.guru-group.fi (Postfix, from userid 501) id 9F3801001E5; Thu, 9 Jun 2016 22:20:57 +0300 (EEST) From: Tomi Ollila To: notmuch@notmuchmail.org Cc: tomi.ollila@iki.fi Subject: [PATCH] test/notmuch-test: simple streamlining Date: Thu, 9 Jun 2016 22:20:56 +0300 Message-Id: <1465500056-25510-1-git-send-email-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.8.2 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: Thu, 09 Jun 2016 19:21:26 -0000 A few simple things that applies well to test/notmuch-test.sh - Shell does pathname expansion also without doing `echo ...` in subshell. - Redirections >/dev/null 2>/dev/null hide (improbable but) potential serious errors; adding -f to rm instead. - Inter-file capitalization consistency in comments. - Unnecesary space removal. --- test/notmuch-test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/notmuch-test b/test/notmuch-test index 988dce6c59cb..e7d3151ce8cb 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -17,14 +17,14 @@ fi cd "$(dirname "$0")" -TESTS=${NOTMUCH_TESTS:-`echo T[0-9][0-9][0-9]-*.sh`} +TESTS=${NOTMUCH_TESTS:-T[0-9][0-9][0-9]-*.sh} # Clean up any results from a previous run -rm -r test-results >/dev/null 2>/dev/null +rm -rf test-results -# test for timeout utility +# Test for timeout utility if command -v timeout >/dev/null; then - TEST_TIMEOUT_CMD="timeout 2m " + TEST_TIMEOUT_CMD="timeout 2m" echo "INFO: using 2 minute timeout for tests" else TEST_TIMEOUT_CMD="" -- 2.8.2