Bug 1348796 - Use buildbot --platform arg to determine --enable-debug vs --disable-debug. r=arai, a=test-only
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -34,17 +34,17 @@ DIR = directories(os.path, os.getcwd())
PDIR = directories(posixpath, os.environ["PWD"],
fixup=lambda s: re.sub(r'^(\w):', r'/\1', s))
parser = argparse.ArgumentParser(
description='Run a spidermonkey shell build job')
parser.add_argument('--dep', action='store_true',
help='do not clobber the objdir before building')
parser.add_argument('--platform', '-p', type=str, metavar='PLATFORM',
- default='', help='build platform')
+ default='', help='build platform, including a suffix ("-debug" or "") used by buildbot to override the variant\'s "debug" setting. The platform can be used to specify 32 vs 64 bits.')
parser.add_argument('--timeout', '-t', type=int, metavar='TIMEOUT',
default=10800,
help='kill job after TIMEOUT seconds')
parser.add_argument('--objdir', type=str, metavar='DIR',
default=env.get('OBJDIR', 'obj-spider'),
help='object directory')
group = parser.add_mutually_exclusive_group()
group.add_argument('--optimize', action='store_true',
@@ -153,16 +153,19 @@ CONFIGURE_ARGS = variant['configure-args
opt = args.optimize
if opt is None:
opt = variant.get('optimize')
if opt is not None:
CONFIGURE_ARGS += (" --enable-optimize" if opt else " --disable-optimize")
opt = args.debug
+if opt is None and args.platform:
+ # Override variant['debug'].
+ opt = ('-debug' in args.platform)
if opt is None:
opt = variant.get('debug')
if opt is not None:
CONFIGURE_ARGS += (" --enable-debug" if opt else " --disable-debug")
# Any jobs that wish to produce additional output can save them into the upload
# directory if there is such a thing, falling back to OBJDIR.
env.setdefault('MOZ_UPLOAD_DIR', OBJDIR)