tests: Don't use pushd or popd, just use cd to change working directory.
authorMark Wielaard <mjw@redhat.com>
Mon, 29 Apr 2013 18:48:36 +0000 (20:48 +0200)
committerMark Wielaard <mjw@redhat.com>
Mon, 29 Apr 2013 18:48:36 +0000 (20:48 +0200)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
tests/ChangeLog
tests/test-subr.sh

index 6f1af3d..f6c004c 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-29  Mark Wielaard  <mjw@redhat.com>
+
+       * 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  <mjw@redhat.com>
 
        * test-subr.sh (exit_cleanup): New function.
index 3ef218c..b5ab105 100644 (file)
@@ -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