From 807ea3155d09c9b128f569b469209e530879e690 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 29 Apr 2013 20:48:36 +0200 Subject: [PATCH] tests: Don't use pushd or popd, just use cd to change working directory. Signed-off-by: Mark Wielaard --- tests/ChangeLog | 5 +++++ tests/test-subr.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 -- 2.47.2