From 3459d319d1ea16c51937ec5e2046a48d8f54050c Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Fri, 17 Aug 2001 01:44:13 +0000 Subject: [PATCH] Set up scratch directory for tests. --- .cvsignore | 1 + Makefile.in | 2 +- testsuite/master.test | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 86b08b58..7e45f316 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,4 +5,5 @@ config.h config.log config.status rsync +testdir zlib/dummy diff --git a/Makefile.in b/Makefile.in index ee6b5c41..7e3df792 100644 --- a/Makefile.in +++ b/Makefile.in @@ -92,4 +92,4 @@ finddead: test: check check: - rsync_bin=`pwd`/rsync srcdir="$(srcdir)" $(srcdir)/testsuite/master.test + rsync_bin=`pwd`/rsync srcdir="$(srcdir)" testdir=`pwd`/testdir $(srcdir)/testsuite/master.test diff --git a/testsuite/master.test b/testsuite/master.test index 4f9f2866..2260386e 100755 --- a/testsuite/master.test +++ b/testsuite/master.test @@ -17,16 +17,27 @@ # build scripts. It might be relative, so we need to make it # absolute. +# testdir is a scratch directory for holding temporary test files. + # The pwd is undefined when this script starts. +set -e + +if ! [ -d "$testdir" ] && ! mkdir "$testdir" +then + echo "warning: testdir $testdir is not a directory!" >&2 + exit 1 +fi + +testdir=`cd $testdir && pwd` + srcdir=`cd $srcdir && pwd` echo "============================================================" echo "$0 running in `pwd`" echo " rsync_bin=$rsync_bin" echo " srcdir=$srcdir" - -set -e +echo " testdir=$testdir" test_names="rsync-hello hands" -- 2.34.1