]> Cypherpunks.ru repositories - goredo.git/commitdiff
mktemp is unnecessary
authorSergey Matveev <stargrave@stargrave.org>
Wed, 15 Sep 2021 20:14:45 +0000 (23:14 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 15 Sep 2021 20:14:46 +0000 (23:14 +0300)
Because "prove" already creates temporary directory it works within.

t/goredo-deps-after-cd.t
t/goredo-deps.t
t/goredo-empty-dep.t
t/goredo-failed-build.t

index a4014a12b0afc6a2eece6551f9dda93e0e5cbccb..bd25ae498c3222430f8d8f1448a5fba87596bec6 100755 (executable)
@@ -4,10 +4,6 @@ testname=`basename "$0"`
 test_description="Check that dependencies have correct relative path after cd"
 . $SHARNESS_TEST_SRCDIR/sharness.sh
 
-tmp=`mktemp -d`
-trap "rm -fr $tmp" HUP PIPE INT QUIT TERM EXIT
-
-cd $tmp
 mkdir -p bin src
 cat > bin/default.do <<EOF
 cd ../src
index 5ab869c013b853d33c98a337bfbe548703f35275..9624059bd62a5e9669645a4363b690537717ea4d 100755 (executable)
@@ -4,10 +4,6 @@ testname=`basename "$0"`
 test_description="Check that the following use-case won't rebuild everytime and has correct dependencies"
 . $SHARNESS_TEST_SRCDIR/sharness.sh
 
-tmp=`mktemp -d`
-trap "rm -fr $tmp" HUP PIPE INT QUIT TERM EXIT
-
-cd $tmp
 mkdir -p sub
 cat > default.html.do <<EOF
 redo-ifchange \$2.pre
index 1b4a6d25f79c71e53b13f177bbcb9b979604d6ff..ee942fc0f115035ea53a76f4c706638b375d9598 100755 (executable)
@@ -4,10 +4,6 @@ testname=`basename "$0"`
 test_description="Check that empty target is a dependency and always OOD"
 . $SHARNESS_TEST_SRCDIR/sharness.sh
 
-tmp=`mktemp -d`
-trap "rm -fr $tmp" HUP PIPE INT QUIT TERM EXIT
-cd $tmp
-
 echo > foo.do
 cat > bar.do <<EOF
 redo-ifchange foo
index 06431016c7bac41f5f92b28f0d40cbb88c3ecc94..b5fb53ccc238301bd4c758734c2236471f071190 100755 (executable)
@@ -4,10 +4,6 @@ testname=`basename "$0"`
 test_description="Check that failed build is still OOD target"
 . $SHARNESS_TEST_SRCDIR/sharness.sh
 
-tmp=`mktemp -d`
-trap "rm -fr $tmp" HUP PIPE INT QUIT TERM EXIT
-cd $tmp
-
 echo exit 1 > bar.do
 echo redo-ifchange bar > foo.do
 export REDO_NO_PROGRESS=1