summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-10-06 18:10:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-10-09 15:11:01 +0200
commit6d8b3efadb07dc86c812471a69e57f6d05fdb0fd (patch)
tree266c31655fd4a40e46c6fb29f64b1cd59b10831c /script
parent2d2dbf53ee110bfcd2f193d3e5c8d0e27759c4f3 (diff)
downloadsamba-6d8b3efadb07dc86c812471a69e57f6d05fdb0fd.tar.gz
samba-6d8b3efadb07dc86c812471a69e57f6d05fdb0fd.tar.xz
samba-6d8b3efadb07dc86c812471a69e57f6d05fdb0fd.zip
land: Use temp dir if /memdisk is not available.
Diffstat (limited to 'script')
-rwxr-xr-xscript/land.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/script/land.py b/script/land.py
index 6b25134d5d3..4b7d1cacba3 100755
--- a/script/land.py
+++ b/script/land.py
@@ -16,6 +16,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/pytho
import subunit
import testtools
import subunithelper
+import tempfile
from email.mime.application import MIMEApplication
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
@@ -511,7 +512,12 @@ def push_to(url):
run_cmd(["git", "push", "pushto", "+HEAD:master"], show=True,
dir=test_master)
-def_testbase = os.getenv("AUTOBUILD_TESTBASE", "/memdisk/%s" % os.getenv('USER'))
+def_testbase = os.getenv("AUTOBUILD_TESTBASE")
+if def_testbase is None:
+ if os.path.exists("/memdisk"):
+ def_testbase = "/memdisk/%s" % os.getenv('USER')
+ else:
+ def_testbase = os.path.join(tempfile.gettempdir(), "autobuild-%s" % os.getenv("USER"))
parser = OptionParser()
parser.add_option("--repository", help="repository to run tests for", default=None, type=str)