Re: [PATCH] test: Always use paths without symlinks

2015-12-30 Thread David Bremner
Michal Sojka  writes:


>
> This commit makes all paths in test scripts physical. With it, all
> tests pass even when run from a symlinked directory.

pushed.

d
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] test: Always use paths without symlinks

2015-12-29 Thread Michal Sojka
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.OUTPUT2015-12-29 08:54:29.055878637 +
+++ T310-emacs.26.EXPECTED  2015-12-29 08:54:29.055878637 +
@@ -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

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] test: Always use paths without symlinks

2015-12-29 Thread Tomi Ollila
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.OUTPUT2015-12-29 08:54:29.055878637 +
> +++ T310-emacs.26.EXPECTED  2015-12-29 08:54:29.055878637 +
> @@ -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
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch