# This speeds up testing remarkably.
os.environ['TDB_NO_FSYNC'] = '1'
+
+def find_git_root():
+ '''get to the top of the git repo'''
+ p = os.getcwd()
+ while p != '/':
+ if os.path.isdir(os.path.join(p, ".git")):
+ return p
+ p = os.path.abspath(os.path.join(p, '..'))
+ return None
+
+
+gitroot = find_git_root()
+if gitroot is None:
+ raise Exception("Failed to find git root")
+
+
cleanup_list = []
builddirs = {
"samba-systemkrb5": [
("random-sleep", "script/random-sleep.sh 900 1500", "text/plain"),
- ("configure", "./configure.developer " + samba_configure_params + " --with-system-mitkrb5 --without-ad-dc", "text/plain"),
+ ("configure", "./configure.developer " + samba_configure_params + " --with-system-mitkrb5 --with-experimental-mit-ad-dc", "text/plain"),
("make", "make -j", "text/plain"),
# we currently cannot run a full make test, a limited list of tests could be run
# via "make test TESTS=sometests"
("configure", "./configure.developer --picky-developer ${PREFIX} --with-profiling-data --disable-python --without-ad-dc", "text/plain"),
("make", "make -j", "text/plain"),
("install", "make install", "text/plain"),
+ ("find-python", "script/find_python.sh ${PREFIX}", "text/plain"),
("test", "make test-nopython", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
("clean", "make clean", "text/plain"),
("configure", "PYTHON=python2 ./configure.developer --picky-developer ${PREFIX} --with-profiling-data --disable-python --without-ad-dc", "text/plain"),
("make", "PYTHON=python2 make -j", "text/plain"),
("install", "PYTHON=python2 make install", "text/plain"),
+ ("find-python", "script/find_python.sh ${PREFIX}", "text/plain"),
("test", "make test-nopython", "text/plain"),
("check-clean-tree", "script/clean-source-tree.sh", "text/plain"),
("clean", "PYTHON=python2 make clean", "text/plain"),
self.stdout = open(self.stdout_path, 'w')
self.stderr = open(self.stderr_path, 'w')
self.stdin = open("/dev/null", 'r')
- self.sdir = "%s/%s" % (testbase, self.tag)
+ self.test_source_dir = "%s/%s" % (testbase, self.tag)
self.prefix = "%s/%s" % (test_prefix, self.tag)
- run_cmd("rm -rf %s" % self.sdir)
+ run_cmd("rm -rf %s" % self.test_source_dir)
run_cmd("rm -rf %s" % self.prefix)
if cp:
- run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.sdir), dir=test_master, show=True)
+ run_cmd("cp --recursive --link --archive %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
else:
- run_cmd("git clone --recursive --shared %s %s" % (test_master, self.sdir), dir=test_master, show=True)
+ run_cmd("git clone --recursive --shared %s %s" % (test_master, self.test_source_dir), dir=test_master, show=True)
self.start_next()
def start_next(self):
if self.next == len(self.sequence):
if not options.nocleanup:
- run_cmd("rm -rf %s" % self.sdir)
+ run_cmd("rm -rf %s" % self.test_source_dir)
run_cmd("rm -rf %s" % self.prefix)
do_print('%s: Completed OK' % self.name)
self.done = True
# if self.output_mime_type == "text/x-subunit":
# self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit"))
cwd = os.getcwd()
- os.chdir("%s/%s" % (self.sdir, self.dir))
+ os.chdir("%s/%s" % (self.test_source_dir, self.dir))
do_print('%s: [%s] Running %s in %r' % (self.name, self.stage, self.cmd, os.getcwd()))
self.proc = Popen(self.cmd, shell=True,
close_fds=True,
self.retry = None
for b in self.tlist:
if b.proc is not None:
- run_cmd("killbysubdir %s > /dev/null 2>&1" % b.sdir, checkfail=False)
+ run_cmd("killbysubdir %s > /dev/null 2>&1" % b.test_source_dir, checkfail=False)
b.proc.terminate()
b.proc.wait()
b.proc = None
run_cmd("rm -rf %s" % d)
-def find_git_root():
- '''get to the top of the git repo'''
- p = os.getcwd()
- while p != '/':
- if os.path.isdir(os.path.join(p, ".git")):
- return p
- p = os.path.abspath(os.path.join(p, '..'))
- return None
-
-
def daemonize(logfile):
pid = os.fork()
if pid == 0: # Parent
def_testbase = os.getenv("AUTOBUILD_TESTBASE", "/memdisk/%s" % os.getenv('USER'))
-gitroot = find_git_root()
-if gitroot is None:
- raise Exception("Failed to find git root")
-
parser = OptionParser()
parser.add_option("", "--tail", help="show output while running", default=False, action="store_true")
parser.add_option("", "--keeplogs", help="keep logs", default=False, action="store_true")