diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2010-05-04 21:46:12 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2010-05-04 21:46:12 +0200 |
commit | 9dbdc0e748837620dcdd63978e4232c8be1f0566 (patch) | |
tree | a6900ff01a791347e8739d35d67628bc194486c4 /tests | |
parent | 80cfee88e698aec70c2f440cadd86c1843b63ef6 (diff) | |
download | patch-9dbdc0e748837620dcdd63978e4232c8be1f0566.tar.gz |
Create temporary test directories in builddir
* tests/test-lib.sh: Create temporary directories in builddir; this
removes the need to do it safely: some systems do not have mktemp -d.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-lib.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 1ba10b2..eeb6492 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -36,12 +36,8 @@ have_ed() { } use_tmpdir() { - tmpdir=`mktemp -d ${TMPDIR:-/tmp}/patch.XXXXXXXXXX` - if test -z "$tmpdir" ; then - echo "This test requires the mktemp utility" >&2 - exit 77 - fi - cd "$tmpdir" + tmpdir=$abs_top_builddir/tests/tmp.$$ + mkdir "$tmpdir" && cd "$tmpdir" || exit 2 } use_local_patch() { |