script/autobuild.py: create tmpdir for each try and export it as TMPDIR
authorStefan Metzmacher <metze@samba.org>
Fri, 16 Dec 2016 12:35:36 +0000 (13:35 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 17 Dec 2016 18:16:14 +0000 (19:16 +0100)
This way the compiler and other tools hopefully don't use /tmp
anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
script/autobuild.py

index 9fc5c90e12f1ddec5fced97889a83df41c17a934..3d76130b57d0f616dfea55534f7fd9c882c4f6a9 100755 (executable)
@@ -709,6 +709,8 @@ if options.retry:
 testbase = "%s/b%u" % (options.testbase, os.getpid())
 test_master = "%s/master" % testbase
 test_prefix = "%s/prefix" % testbase
+test_tmpdir = "%s/tmp" % testbase
+os.environ['TMPDIR'] = test_tmpdir
 
 # get the top commit message, for emails
 top_commit_msg = run_cmd("git log -1", dir=gitroot, output=True)
@@ -732,6 +734,8 @@ while True:
     try:
         run_cmd("rm -rf %s" % test_master)
         run_cmd("rm -rf %s" % test_prefix)
+        run_cmd("rm -rf %s" % test_tmpdir)
+        os.makedirs(test_tmpdir)
         run_cmd("git clone --recursive --shared %s %s" % (gitroot, test_master), show=True, dir=gitroot)
     except Exception:
         cleanup()