Bugfix: test-lib.sh TEST_DIRECTORY could still contain symlink

This commit is contained in:
Philippe Teuwen
2009-04-18 21:31:38 +02:00
committed by Emil Sit
parent fee3133547
commit c8fc661256

View File

@@ -407,6 +407,10 @@ test_done () {
esac esac
} }
# Use -P to resolve symlinks in our working directory so that the pwd
# in subprocesses equals our $PWD (for pathname comparisons).
cd -P .
# Record our location for reference. # Record our location for reference.
TEST_DIRECTORY=$(pwd) TEST_DIRECTORY=$(pwd)
@@ -572,7 +576,7 @@ EOF
} }
test_init_todo "$test" test_init_todo "$test"
# Use -P to resolve symlinks in our working directory so that the cwd # Use -P to resolve symlinks in our working directory so that the pwd
# in subprocesses equals our $PWD (for pathname comparisons). # in subprocesses equals our $PWD (for pathname comparisons).
cd -P "$test" || exit 1 cd -P "$test" || exit 1