From: drepper Date: Wed, 24 Sep 1997 22:37:23 +0000 (+0000) Subject: Don't cd before running the program, instead pass testdir as argument, X-Git-Tag: libc-ud-970924~21 X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=commitdiff_plain;h=73d9da4dc8160c9bee0f33dfd44f03034dc0cbd4 Don't cd before running the program, instead pass testdir as argument, so that $common_objpfx remains valid. --- diff --git a/posix/globtest.sh b/posix/globtest.sh index c51655b9b3..61fec9874c 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -20,10 +20,9 @@ echo 1_2 > $testdir/dir1/file1_2 # Run some tests. result=0 -here=`pwd` -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 `dir1' @@ -33,8 +32,8 @@ cat <<"EOF" | cmp - $testout || result=1 not NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*/*") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*/*" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 `dir1/file1_1' @@ -42,40 +41,40 @@ cat <<"EOF" | cmp - $testout || result=1 not NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*/1") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*/1" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 GLOB_NOMATCH NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*/*1_1") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*/*1_1" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 `dir1/file1_1' not NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*/file1_1") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*/file1_1" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 `dir1/file1_1' not NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*-/*") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*-/*" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 GLOB_NOMATCH NULL EOF -(cd $testdir && - LD_LIBRARY_PATH=$common_objpfx $common_objpfx/posix/globtest "*-") | +LD_LIBRARY_PATH=$common_objpfx \ +${common_objpfx}posix/globtest "$testdir" "*-" | sort > $testout cat <<"EOF" | cmp - $testout || result=1 GLOB_NOMATCH