Bug 1175701 - Windows Puppet machines failing on sendchange, adds multi exe support, r=mshal
--- a/configs/builds/releng_base_windows_32_builds.py
+++ b/configs/builds/releng_base_windows_32_builds.py
@@ -25,20 +25,26 @@ config = {
'exes': {
'python2.7': sys.executable,
'hgtool.py': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'tools', 'buildfarm', 'utils', 'hgtool.py'
)
],
- "buildbot": [
- sys.executable,
- 'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
- ],
+ "buildbot": {
+ 'gpo_location': [
+ sys.executable,
+ 'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
+ ],
+ 'puppet_location': [
+ sys.executable,
+ 'c:\\mozilla-build\\buildbot-0.8.4-pre-moz6\\scripts\\buildbot'
+ ]
+ },
"make": [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
],
'virtualenv': [
sys.executable,
--- a/configs/builds/releng_base_windows_64_builds.py
+++ b/configs/builds/releng_base_windows_64_builds.py
@@ -25,20 +25,26 @@ config = {
'exes': {
'python2.7': sys.executable,
'hgtool.py': [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'tools', 'buildfarm', 'utils', 'hgtool.py'
)
],
- "buildbot": [
- sys.executable,
- 'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
- ],
+ "buildbot": {
+ 'gpo_location': [
+ sys.executable,
+ 'c:\\mozilla-build\\buildbotve\\scripts\\buildbot'
+ ],
+ 'puppet_location': [
+ sys.executable,
+ 'c:\\mozilla-build\\buildbot-0.8.4-pre-moz6\\scripts\\buildbot'
+ ]
+ },
"make": [
sys.executable,
os.path.join(
os.getcwd(), 'build', 'src', 'build', 'pymake', 'make.py'
)
],
'virtualenv': [
sys.executable,
--- a/mozharness/base/script.py
+++ b/mozharness/base/script.py
@@ -940,22 +940,45 @@ class ScriptMixin(PlatformMixin):
if default is None:
default = exe_name
exe = self.config.get(exe_dict, {}).get(exe_name, default)
repl_dict = {}
if hasattr(self.script_obj, 'query_abs_dirs'):
# allow for 'make': '%(abs_work_dir)s/...' etc.
dirs = self.script_obj.query_abs_dirs()
repl_dict.update(dirs)
- if isinstance(exe, list) or isinstance(exe, tuple):
+ if isinstance(exe, dict):
+ found = False
+ # allow for searchable paths of the buildbot exe
+ for name, path in exe.iteritems():
+ if isinstance(path, list) or isinstance(path, tuple):
+ path = [x % repl_dict for x in path]
+ if all([os.path.exists(section) for section in path]):
+ found = True
+ elif isinstance(path, str):
+ path = path % repl_dict
+ if os.path.exists(path):
+ found = True
+ else:
+ self.log("a exes %s dict's value is not a string, list, or tuple. Got key "
+ "%s and value %s" % (exe_name, name, str(path)), level=error_level)
+ if found:
+ exe = path
+ break
+ else:
+ self.log("query_exe was a searchable dict but an existing path could not be "
+ "determined. Tried searching in paths: %s" % (str(exe)), level=error_level)
+ return None
+ elif isinstance(exe, list) or isinstance(exe, tuple):
exe = [x % repl_dict for x in exe]
elif isinstance(exe, str):
exe = exe % repl_dict
else:
- self.log("query_exe: %s is not a list, tuple or string: %s!" % (exe_name, str(exe)), level=error_level)
+ self.log("query_exe: %s is not a list, tuple, dict, or string: "
+ "%s!" % (exe_name, str(exe)), level=error_level)
return exe
if return_type == "list":
if isinstance(exe, str):
exe = [exe]
elif return_type == "string":
if isinstance(exe, list):
exe = subprocess.list2cmdline(exe)
elif return_type is not None: