From d6d759f590779e7b173d92e25c1dd988c8fe4f04 Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Wed, 9 Apr 2014 00:59:24 +0100
Subject: [PATCH] Makefile: allow tmpfs size to be more easily overridden, and
 use 500 MiB by default (rebased).

(The kernel will only allocate space that is used; the limit is just in case
tests write more than expected.)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---
 Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index a0e05583..be3cd21b 100644
--- a/Makefile
+++ b/Makefile
@@ -62,13 +62,16 @@ quicktest: make-version
 	$(TAHOE) debug trial $(TRIALARGS) $(TEST)
 
 # "make tmpfstest" may be a faster way of running tests on Linux. It works best when you have
-# at least 330 MiB of free physical memory (to run the whole test suite). Since it uses sudo
-# to mount/unmount the tmpfs filesystem, it might prompt for your password.
+# at least $(TMPFS_SIZE) of free physical memory (to run the whole test suite). Since it uses
+# sudo to mount/unmount the tmpfs filesystem, it might prompt for your password.
+
+TMPFS_SIZE = 500m
+
 tmpfstest:
 	time make _tmpfstest 'TMPDIR=$(shell mktemp -d --tmpdir=.)'
 
 _tmpfstest: make-version
-	sudo mount -t tmpfs -o size=400m tmpfs '$(TMPDIR)'
+	sudo mount -t tmpfs -o size=$(TMPFS_SIZE) tmpfs '$(TMPDIR)'
 	-$(TAHOE) debug trial --rterrors '--temp-directory=$(TMPDIR)/_trial_temp' $(TRIALARGS) $(TEST)
 	sudo umount '$(TMPDIR)'
 	rmdir '$(TMPDIR)'
-- 
2.45.2