]> arthur.barton.de Git - bup.git/commitdiff
Manually set TMPDIR to $(CURDIR)/tmp for all tests for now.
authorRob Browning <rlb@defaultvalue.org>
Sat, 16 Nov 2013 23:38:57 +0000 (17:38 -0600)
committerRob Browning <rlb@defaultvalue.org>
Tue, 19 Nov 2013 19:13:11 +0000 (13:13 -0600)
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Makefile

index 8b9167e415e84fed942a7a65d23275cf928e558e..0e2fc90699c7c095422bd0253407a8aa54315aa4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,12 @@ ifeq ($(OS),CYGWIN)
   SOEXT:=.dll
 endif
 
+ifdef TMPDIR
+  test_tmp := $(TMPDIR)
+else
+  test_tmp := $(CURDIR)/t/tmp
+endif
+
 default: all
 
 all: bup Documentation/all
@@ -80,18 +86,20 @@ lib/bup/_version.py:
 runtests: all runtests-python runtests-cmdline
 
 runtests-python: all
-       $(PYTHON) wvtest.py t/t*.py lib/*/t/t*.py
+       test -e t/tmp || mkdir t/tmp
+       TMPDIR="$(test_tmp)" $(PYTHON) wvtest.py t/t*.py lib/*/t/t*.py
 
 runtests-cmdline: all
-       t/test-cat-file.sh
-       t/test-index-check-device.sh
-       t/test-meta.sh
-       t/test-restore-map-owner.sh
-       t/test-restore-single-file.sh
-       t/test-rm-between-index-and-save.sh
-       t/test-command-without-init-fails.sh
-       t/test-redundant-saves.sh
-       t/test.sh
+       test -e t/tmp || mkdir t/tmp
+       TMPDIR="$(test_tmp)" t/test-cat-file.sh
+       TMPDIR="$(test_tmp)" t/test-index-check-device.sh
+       TMPDIR="$(test_tmp)" t/test-meta.sh
+       TMPDIR="$(test_tmp)" t/test-restore-map-owner.sh
+       TMPDIR="$(test_tmp)" t/test-restore-single-file.sh
+       TMPDIR="$(test_tmp)" t/test-rm-between-index-and-save.sh
+       TMPDIR="$(test_tmp)" t/test-command-without-init-fails.sh
+       TMPDIR="$(test_tmp)" t/test-redundant-saves.sh
+       TMPDIR="$(test_tmp)" t/test.sh
 
 stupid:
        PATH=/bin:/usr/bin $(MAKE) test