From: Michal Sojka Date: Tue, 29 Dec 2015 09:30:26 +0000 (+0100) Subject: [PATCH] test: Always use paths without symlinks X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9cb31c5855d7aeceb71a7104e4eb9404069de0dd;p=notmuch-archives.git [PATCH] test: Always use paths without symlinks --- diff --git a/35/5f493fba6aee43171e97b14a91d2f650160a3e b/35/5f493fba6aee43171e97b14a91d2f650160a3e new file mode 100644 index 000000000..686a8c58d --- /dev/null +++ b/35/5f493fba6aee43171e97b14a91d2f650160a3e @@ -0,0 +1,93 @@ +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 B97116DE17AD + for ; Tue, 29 Dec 2015 01:30:37 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -1.454 +X-Spam-Level: +X-Spam-Status: No, score=-1.454 tagged_above=-999 required=5 tests=[AWL=1.396, + RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] 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 w7-AfLOVQJhx for ; + Tue, 29 Dec 2015 01:30:36 -0800 (PST) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by arlo.cworth.org (Postfix) with ESMTP id DF9A86DE17AC + for ; Tue, 29 Dec 2015 01:30:35 -0800 (PST) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 20C0919F499F + for ; Tue, 29 Dec 2015 10:30:35 +0100 (CET) +X-Virus-Scanned: IMAP STYX AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) + with ESMTP id 7Hz_EX1VRcO8 for ; + Tue, 29 Dec 2015 10:30:33 +0100 (CET) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 9EF9E19F4998 + for ; Tue, 29 Dec 2015 10:30:32 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.86) + (envelope-from ) + id 1aDqbv-0004dP-7v; Tue, 29 Dec 2015 10:30:31 +0100 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH] test: Always use paths without symlinks +Date: Tue, 29 Dec 2015 10:30:26 +0100 +Message-Id: <1451381426-17777-1-git-send-email-sojkam1@fel.cvut.cz> +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: Tue, 29 Dec 2015 09:30:37 -0000 + +When notmuch sources are at a symlinked path, some tests fail because +one part of the test uses physical path and another uses logical +path (with symlinks). For example the following test output is +produced when the test is started from /home/src/symlink-to-notmuch, +which is a symlink to /home/src/notmuch. + + FAIL notmuch-fcc-dirs set to a string + --- T310-emacs.26.OUTPUT 2015-12-29 08:54:29.055878637 +0000 + +++ T310-emacs.26.EXPECTED 2015-12-29 08:54:29.055878637 +0000 + @@ -1,5 +1,5 @@ + From: Notmuch Test Suite + To: + Subject: + -Fcc: /home/src/notmuch/test/tmp.T310-emacs/mail/sent-string + +Fcc: /home/src/symlink-to-notmuch/test/tmp.T310-emacs/mail/sent-string + --text follows this line-- + nil + +This commit makes all paths in test scripts physical. With it, all +tests pass even when run from a symlinked directory. +--- + test/test-lib-common.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh +index 5eb618c..4e17b78 100644 +--- a/test/test-lib-common.sh ++++ b/test/test-lib-common.sh +@@ -48,7 +48,7 @@ restore_database () { + + # Test the binaries we have just built. The tests are kept in + # test/ subdirectory and are run in 'trash directory' subdirectory. +-TEST_DIRECTORY=$(pwd) ++TEST_DIRECTORY=$(pwd -P) + notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"` + + # configure output +-- +2.6.4 +