On 06/19/2012 10:58 AM, Nelson H. F. Beebe wrote:
> Why is the old /usr/local/bin/zdiff being used in the validation
> suite checks, instead of the newly-built one?
Good question. I suspect $PWD malfunction.
Does the following patch fix it?
diff --git a/tests/init.sh b/tests/init.sh
index f525a7c..d53e0db 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -411,12 +411,12 @@ path_prepend_ ()
case $path_dir_ in
'') fail_ "invalid path dir: '$1'";;
/*) abs_path_dir_=$path_dir_;;
- *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
- || fail_ "invalid path dir: $path_dir_";;
+ *) abs_path_dir_=$initial_cwd_/$path_dir_;;
esac
case $abs_path_dir_ in
*:*) fail_ "invalid path dir: '$abs_path_dir_'";;
esac
+ test -d "$abs_path_dir_/." || fail_ "invalid path dir: $path_dir_";;
PATH="$abs_path_dir_:$PATH"
# Create an alias, FOO, for each FOO.exe in this directory.
@@ -448,7 +448,7 @@ setup_ ()
pfx_=`testdir_prefix_`
test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
|| fail_ "failed to create temporary directory in $initial_cwd_"
- cd "$test_dir_"
+ cd "$test_dir_" || fatal_ "failed to cd to temporary directory"
# As autoconf-generated configure scripts do, ensure that IFS
# is defined initially, so that saving and restoring $IFS works.