From: Tomi Ollila Date: Tue, 29 Dec 2015 11:14:12 +0000 (+0200) Subject: Re: [PATCH] test: Always use paths without symlinks X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=79c39b2bc17257a3fb7990c5bd1602f35f4235ea;p=notmuch-archives.git Re: [PATCH] test: Always use paths without symlinks --- diff --git a/59/452be995b3304643320fd9abc3cddaf40e95de b/59/452be995b3304643320fd9abc3cddaf40e95de new file mode 100644 index 000000000..5f528e024 --- /dev/null +++ b/59/452be995b3304643320fd9abc3cddaf40e95de @@ -0,0 +1,103 @@ +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 B94466DE17BE + for ; Tue, 29 Dec 2015 03:13:57 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.684 +X-Spam-Level: +X-Spam-Status: No, score=0.684 tagged_above=-999 required=5 tests=[AWL=0.032, + SPF_NEUTRAL=0.652] 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 408MCabjgbKF for ; + Tue, 29 Dec 2015 03:13:55 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id F264C6DE17BA + for ; Tue, 29 Dec 2015 03:13:54 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 9578F10008C; + Tue, 29 Dec 2015 13:14:12 +0200 (EET) +From: Tomi Ollila +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH] test: Always use paths without symlinks +In-Reply-To: <1451381426-17777-1-git-send-email-sojkam1@fel.cvut.cz> +References: <1451381426-17777-1-git-send-email-sojkam1@fel.cvut.cz> +User-Agent: Notmuch/0.21+32~g73439f8 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +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 11:13:58 -0000 + +On Tue, Dec 29 2015, Michal Sojka wrote: + +> 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. + +Looks good, is portable (bash builtin) and seems also fix cases I thought +might have been a problem instead. + +Tomi + + +> --- +> 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 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> https://notmuchmail.org/mailman/listinfo/notmuch