diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-26 12:50:06 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-26 19:51:02 +0000 |
commit | 5ffacff5c4a4799aacf97cbc28581f8e302c145c (patch) | |
tree | 11ed3e48fb2af5cc55338bee454634d7079374d5 /script | |
parent | cc79f092ba098543d253884dc9dc2be3c30cd282 (diff) | |
download | samba-5ffacff5c4a4799aacf97cbc28581f8e302c145c.tar.gz samba-5ffacff5c4a4799aacf97cbc28581f8e302c145c.tar.bz2 samba-5ffacff5c4a4799aacf97cbc28581f8e302c145c.zip |
autobuild: use killbysubdir if available
this will reduce the spurious test output while processes are being
killed
Diffstat (limited to 'script')
-rwxr-xr-x | script/autobuild.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index 856ea625e5..5d7228b051 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -72,7 +72,7 @@ retry_task = [ '''set -e done ''' % samba_master] -def run_cmd(cmd, dir=".", show=None, output=False): +def run_cmd(cmd, dir=".", show=None, output=False, checkfail=True): cwd = os.getcwd() os.chdir(dir) if show is None: @@ -85,8 +85,9 @@ def run_cmd(cmd, dir=".", show=None, output=False): return ret ret = os.system(cmd) os.chdir(cwd) - if ret != 0: + if checkfail and ret != 0: raise Exception("FAILED %s: %d" % (cmd, ret)) + return ret class builder: '''handle build of one directory''' @@ -165,6 +166,7 @@ class buildlist: 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) b.proc.terminate() b.proc.wait() b.proc = None |