[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: Avoid nonportable "mktemp" usage.
From: |
Ben Pfaff |
Subject: |
[PATCH] tests: Avoid nonportable "mktemp" usage. |
Date: |
Sun, 10 Jul 2011 15:52:18 -0700 |
Jeremy Lavergne <address@hidden> reported that
mktemp on Mac OS X does not have a -p option. But I don't see
a reason to use mktemp at all here, so this commit uses a fixed
name instead.
---
This works for me. John, did you have a reason to want to use a random
name here? mktemp doesn't generate very interesting file names in any
case.
diff --git a/tests/libpspp/zip.at b/tests/libpspp/zip.at
index a725049..55bf563 100644
--- a/tests/libpspp/zip.at
+++ b/tests/libpspp/zip.at
@@ -14,7 +14,7 @@ mkdir -p $dir1
names=""
s=1;
while test $s -le 8192 ; do
- name=`mktemp -p $dir1`;
+ name=$dir1/$s
dd if=/dev/urandom of=$name count=1 bs=$s 2> /dev/null
s=$(($s * 2));
bn=`basename $name`;
--
1.7.2.5
- [PATCH] tests: Avoid nonportable "mktemp" usage.,
Ben Pfaff <=