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