summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2013-04-29 20:48:36 +0200
committerMark Wielaard <mjw@redhat.com>2013-04-29 20:48:36 +0200
commit807ea3155d09c9b128f569b469209e530879e690 (patch)
tree3ac4f8c1a6f0ebb16d8a7f0949388c0c74969fca /tests
parent527e21ec4de92870f1b4c88b9465dc010e926260 (diff)
downloadelfutils-807ea3155d09c9b128f569b469209e530879e690.tar.gz
tests: Don't use pushd or popd, just use cd to change working directory.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/test-subr.sh4
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 6f1af3dc..f6c004c7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -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.
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index 3ef218c6..b5ab1059 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