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
cleanup_list = []
-os.putenv('CC', "ccache gcc")
+os.environ['CC'] = "ccache gcc"
tasks = {
"source3" : [ ("autogen", "./autogen.sh", "text/plain"),
("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") ],
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):
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)
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