s4:drsuapi/getncchanges: the default for isRecycled is FALSE
[mat/samba.git] / script / land.py
index a92fa44f64904c83af3ae83d5b2859fdbcab7af2..72bdd4b8408cdd6093673c088485ec1e03180d88 100755 (executable)
@@ -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
@@ -25,7 +26,7 @@ samba_master_ssh = os.getenv('SAMBA_MASTER_SSH', 'git+ssh://git.samba.org/data/g
 
 cleanup_list = []
 
-os.putenv('CC', "ccache gcc")
+os.environ['CC'] = "ccache gcc"
 
 tasks = {
     "source3" : [ ("autogen", "./autogen.sh", "text/plain"),
@@ -40,7 +41,7 @@ tasks = {
                   ("install", "make install", "text/plain"),
                   ("test", "TDB_NO_FSYNC=1 make subunit-test", "text/x-subunit") ],
 
-    "source4/lib/ldb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
+    "lib/ldb" : [ ("configure", "./configure --enable-developer -C ${PREFIX}", "text/plain"),
                           ("make", "make -j", "text/plain"),
                           ("install", "make install", "text/plain"),
                           ("test", "make test", "text/plain") ],
@@ -183,7 +184,7 @@ class AbortingTestResult(subunithelper.TestsuiteEnabledTestResult):
 class FailureTrackingTestResult(subunithelper.TestsuiteEnabledTestResult):
 
     def __init__(self, stage):
-        super(AbortingTestResult, self).__init__()
+        super(FailureTrackingTestResult, self).__init__()
         self.stage = stage
 
     def addError(self, test, details=None):
@@ -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)
@@ -581,7 +587,7 @@ The top commit for the tree that was built was:
 
     msg = MIMEMultipart()
     msg['Subject'] = 'autobuild failure for task %s during %s' % (
-        failed_task, failed_stage)
+        failed_task, failed_stage.name)
     msg['From'] = 'autobuild@samba.org'
     msg['To'] = options.email