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 172BC429E25 for ; Wed, 20 Jul 2011 05:37:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.1 X-Spam-Level: X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] 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 4DeG6dXLStIV for ; Wed, 20 Jul 2011 05:37:04 -0700 (PDT) Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222]) by olra.theworths.org (Postfix) with ESMTP id 9F660431FB6 for ; Wed, 20 Jul 2011 05:37:04 -0700 (PDT) Received: from localhost.localdomain (thor.loria.fr [152.81.12.250]) by ks3536.kimsufi.com (Postfix) with ESMTPSA id 112176A06A9; Wed, 20 Jul 2011 14:45:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net; s=key-schnouki; t=1311165947; bh=0V9P7IWWHsOXYhqc67HTWleu1qifIw+ymnNVX84qBBk=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References; b=dwK23YXhe0jlznFVyhqvSmF4WmJatkDnaBBAx8OCChLPCA9G4huJiLEI4U1SD/JXo YIIp30z/zNEzDVojTiJhLvzdl2ViQQD+QXSvcln6Z3hU84geklX2bGCTzXcYKSgmyk aP7KF5bMqfdVzCrCViNhcdz5rB/dgumXTdnTjvAo= From: Thomas Jost To: notmuch@notmuchmail.org, Dmitry Kurochkin Subject: [PATCH] test: run emacs inside tmux if screen is not available Date: Wed, 20 Jul 2011 14:36:36 +0200 Message-Id: <1311165396-12268-1-git-send-email-schnouki@schnouki.net> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1309496122-4965-2-git-send-email-dmitry.kurochkin@gmail.com> References: <1309496122-4965-2-git-send-email-dmitry.kurochkin@gmail.com> 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, 20 Jul 2011 12:37:07 -0000 Before this change, the test suite reported many failed tests on machines where screen is not installed (which is the case of many *BSD systems). This patch makes the test suite try to use tmux, another terminal multiplexer, if screen is not available. --- test/test-lib.sh | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 0608e42..5851b3d 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -860,12 +860,21 @@ EOF test_emacs () { if [ -z "$EMACS_SERVER" ]; then EMACS_SERVER="notmuch-test-suite-$$" - # start a detached screen session with an emacs server + # start a detached screen or tmux session with an emacs server screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \ --no-window-system \ --eval "(setq server-name \"$EMACS_SERVER\")" \ --eval '(server-start)' \ - --eval "(orphan-watchdog $$)" || return + --eval "(orphan-watchdog $$)" + if [ "$?" != 0 ] + then + tmux -f /dev/null -L "$EMACS_SERVER" new-session -d "$TMP_DIRECTORY/run_emacs \ + --no-window-system \ + --eval \"(setq server-name \\\"$EMACS_SERVER\\\")\" \ + --eval '(server-start)' \ + --eval \"(orphan-watchdog $$)\"" || return + fi + # wait until the emacs server is up until test_emacs '()' 2>/dev/null; do sleep 1 -- 1.7.6