From: David Levine Date: Wed, 10 Aug 2016 15:19:00 +0000 (-0400) Subject: Canonicalized MH_TEST_DIR, and replaced use of `pwd` with it, to X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/28a7732d89032350b7496e0eb5275693cd4fd00c?ds=inline;hp=--cc Canonicalized MH_TEST_DIR, and replaced use of `pwd` with it, to try to prevent test failures on fbsd10 test host. (cherry picked from commit 1846c42228ff68f328cb046027bc7a03ec3ba596) --- 28a7732d89032350b7496e0eb5275693cd4fd00c diff --git a/test/common.sh.in b/test/common.sh.in index 1bf64c59..6336ce96 100644 --- a/test/common.sh.in +++ b/test/common.sh.in @@ -5,7 +5,9 @@ #### The following variables are set by "make check". Ensure #### that they are set here so that individual tests can be run #### outside of make. Requires that MH_OBJ_DIR be set on entry. -test -z "$MH_TEST_DIR" && MH_TEST_DIR="$MH_OBJ_DIR/test/testdir" +#### Use the result of cd and pwd so that the result will agree +#### with what getcwd(3) returns. +test -z "$MH_TEST_DIR" && MH_TEST_DIR=`cd "$MH_OBJ_DIR/test/testdir" && pwd` export MH_TEST_DIR test -z "$MH_INST_DIR" && MH_INST_DIR="${MH_TEST_DIR}/inst" test -z "$MH_VERSION" && MH_VERSION="@VERSION@" diff --git a/test/mhstore/test-mhstore b/test/mhstore/test-mhstore index 6e8c52ae..716c2dd7 100755 --- a/test/mhstore/test-mhstore +++ b/test/mhstore/test-mhstore @@ -312,7 +312,7 @@ check "$expected" 7.txt.2 'keep first' # check -clobber never. Its exit status is the number of files not overwritten. run_test 'mhstore -clobber never' \ - "mhstore: will not overwrite `pwd`/7.txt with -clobber never" + "mhstore: will not overwrite $MH_TEST_DIR/Mail/7.txt with -clobber never" set +e mhstore -clobber never >/dev/null 2>&1 run_test "echo $?" 1