From: Mark Wielaard Date: Mon, 29 Apr 2013 18:48:36 +0000 (+0200) Subject: tests: Don't use pushd or popd, just use cd to change working directory. X-Git-Tag: elfutils-0.156~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807ea3155d09c9b128f569b469209e530879e690;p=thirdparty%2Felfutils.git tests: Don't use pushd or popd, just use cd to change working directory. Signed-off-by: Mark Wielaard --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 6f1af3dc5..f6c004c7a 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2013-04-29 Mark Wielaard + + * test-subr.sh: Don't use pushd, just cd into test-dir. + (exit_cleanup): Don't use popd, just cd .. to get out. + 2013-04-27 Mark Wielaard * test-subr.sh (exit_cleanup): New function. diff --git a/tests/test-subr.sh b/tests/test-subr.sh index 3ef218c66..b5ab1059f 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -25,7 +25,7 @@ set -e # Each test runs in its own directory to make sure they can run in parallel. test_dir="test-$$" mkdir -p "$test_dir" -pushd "$test_dir" > /dev/null +cd "$test_dir" #LC_ALL=C #export LC_ALL @@ -35,7 +35,7 @@ remove_files= # Tests that trap EXIT (0) themselves should call this explicitly. exit_cleanup() { - rm -f $remove_files; popd > /dev/null; rmdir $test_dir + rm -f $remove_files; cd ..; rmdir $test_dir } trap exit_cleanup 0