for section in ini.sections():
if section.startswith("slave "):
if ini.has_option(section, "name") and ini.has_option(section, "password"):
- sl_props = { 'dl_lock':None, 'ul_lock':None, 'do_cleanup':False, 'max_builds':1 }
+ sl_props = { 'dl_lock':None, 'ul_lock':None, 'do_cleanup':False, 'max_builds':1, 'shared_wd':False }
name = ini.get(section, "name")
password = ini.get(section, "password")
max_builds = 1
sl_props['ul_lock'] = lockname
if lockname not in NetLocks:
NetLocks[lockname] = locks.MasterLock(lockname)
+ if ini.has_option(section, "shared_wd"):
+ shared_wd = ini.getboolean(section, "shared_wd")
+ sl_props['shared_wd'] = shared_wd
+ if shared_wd and (max_builds != 1):
+ raise ValueError('max_builds must be 1 with shared workdir!')
c['slaves'].append(BuildSlave(name, password, max_builds = max_builds, properties = sl_props))
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
return CheckCleanProperty
def IsCleanupRequested(step):
+ shared_wd = step.getProperty("shared_wd")
+ if shared_wd:
+ return False
do_cleanup = step.getProperty("do_cleanup")
if do_cleanup:
return True
return False
def IsExpireRequested(step):
- return not IsCleanupRequested(step)
+ shared_wd = step.getProperty("shared_wd")
+ if shared_wd:
+ return False
+ else:
+ return not IsCleanupRequested(step)
def IsGitFreshRequested(step):
do_cleanup = step.getProperty("do_cleanup")