Bug 1348796 - Make debug overridable in autospider.py. r=arai, a=test-only
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -48,16 +48,23 @@ parser.add_argument('--objdir', type=str
help='object directory')
group = parser.add_mutually_exclusive_group()
group.add_argument('--optimize', action='store_true',
help='generate an optimized build. Overrides variant setting.')
group.add_argument('--no-optimize', action='store_false',
dest='optimize',
help='generate a non-optimized build. Overrides variant setting.')
group.set_defaults(optimize=None)
+group = parser.add_mutually_exclusive_group()
+group.add_argument('--debug', action='store_true',
+ help='generate a debug build. Overrides variant setting.')
+group.add_argument('--no-debug', action='store_false',
+ dest='debug',
+ help='generate a non-debug build. Overrides variant setting.')
+group.set_defaults(debug=None)
parser.add_argument('--run-tests', '--tests', type=str, metavar='TESTSUITE',
default='',
help="comma-separated set of test suites to add to the variant's default set")
parser.add_argument('--skip-tests', '--skip', type=str, metavar='TESTSUITE',
default='',
help="comma-separated set of test suites to remove from the variant's default set")
parser.add_argument('--build-only', '--build',
dest='skip_tests', action='store_const', const='all',
@@ -138,22 +145,29 @@ OBJDIR = os.path.join(DIR.source, args.o
OUTDIR = os.path.join(OBJDIR, "out")
POBJDIR = posixpath.join(PDIR.source, args.objdir)
AUTOMATION = env.get('AUTOMATION', False)
MAKE = env.get('MAKE', 'make')
MAKEFLAGS = env.get('MAKEFLAGS', '-j6')
UNAME_M = subprocess.check_output(['uname', '-m']).strip()
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:
+ 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)
ensure_dir_exists(env['MOZ_UPLOAD_DIR'], clobber=False)
# Some of the variants request a particular word size (eg ARM simulators).
word_bits = variant.get('bits')
--- a/js/src/devtools/automation/variants/arm-sim
+++ b/js/src/devtools/automation/variants/arm-sim
@@ -1,5 +1,6 @@
{
- "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
+ "configure-args": "--enable-stdcxx-compat --enable-simulator=arm --target=i686-pc-linux --host=i686-pc-linux",
"optimize": true,
+ "debug": true,
"bits": 32
}
--- a/js/src/devtools/automation/variants/arm-sim-osx
+++ b/js/src/devtools/automation/variants/arm-sim-osx
@@ -1,5 +1,6 @@
{
- "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
+ "configure-args": "--enable-stdcxx-compat --enable-simulator=arm --target=i686-apple-darwin10.0.0 --host=i686-apple-darwin10.0.0",
"optimize": true,
+ "debug": true,
"bits": 32
}
--- a/js/src/devtools/automation/variants/arm64-sim
+++ b/js/src/devtools/automation/variants/arm64-sim
@@ -1,9 +1,10 @@
{
- "configure-args": "--enable-debug --enable-stdcxx-compat --enable-simulator=arm64",
+ "configure-args": "--enable-stdcxx-compat --enable-simulator=arm64",
"optimize": true,
+ "debug": true,
"env": {
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/arm64-jstests-slow.txt",
"JITTEST_EXTRA_ARGS": "--jitflags=none --args=--baseline-eager -x ion/ -x asm.js/"
},
"bits": 64
}
--- a/js/src/devtools/automation/variants/asan
+++ b/js/src/devtools/automation/variants/asan
@@ -1,8 +1,9 @@
{
- "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-address-sanitizer",
+ "configure-args": "--enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-address-sanitizer",
"optimize": true,
+ "debug": false,
"compiler": "clang",
"env": {
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer"
}
}
--- a/js/src/devtools/automation/variants/compacting
+++ b/js/src/devtools/automation/variants/compacting
@@ -1,11 +1,12 @@
{
- "configure-args": "--enable-debug --enable-stdcxx-compat --enable-ctypes",
+ "configure-args": "--enable-stdcxx-compat --enable-ctypes",
"optimize": true,
+ "debug": true,
"env": {
"JS_GC_ZEAL": "Compact",
"JITTEST_EXTRA_ARGS": "--jitflags=debug --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
},
"skip-tests": {
"win32": ["jstests"],
"win64": ["jstests"]
--- a/js/src/devtools/automation/variants/dtrace
+++ b/js/src/devtools/automation/variants/dtrace
@@ -1,4 +1,5 @@
{
- "configure-args": "--enable-debug --enable-dtrace --enable-debug-symbols",
- "optimize": true
+ "configure-args": "--enable-dtrace --enable-debug-symbols",
+ "optimize": true,
+ "debug": true,
}
--- a/js/src/devtools/automation/variants/msan
+++ b/js/src/devtools/automation/variants/msan
@@ -1,11 +1,12 @@
{
- "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-memory-sanitizer",
+ "configure-args": "--enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-memory-sanitizer",
"optimize": true,
+ "debug": false,
"compiler": "clang",
"env": {
"JITTEST_EXTRA_ARGS": "--jitflags=interp --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
"JSTESTS_EXTRA_ARGS": "--jitflags=interp --exclude-file={DIR}/cgc-jstests-slow.txt",
"MSAN_OPTIONS": "external_symbolizer_path={TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer:log_path={OUTDIR}/sanitize_log"
},
"ignore-test-failures": "true",
"max-errors": 2
--- a/js/src/devtools/automation/variants/nonunified
+++ b/js/src/devtools/automation/variants/nonunified
@@ -1,9 +1,10 @@
{
- "configure-args": "--enable-debug --enable-warnings-as-errors",
+ "configure-args": "--enable-warnings-as-errors",
+ "debug": true,
"skip-tests": {
"all": ["jstests", "jittest", "checks"]
},
"extra-tests": {
"all": ["check-style"]
}
}
--- a/js/src/devtools/automation/variants/plaindebug
+++ b/js/src/devtools/automation/variants/plaindebug
@@ -1,6 +1,7 @@
{
- "configure-args": "--enable-debug",
+ "configure-args": "",
+ "debug": true,
"env": {
"JSTESTS_EXTRA_ARGS": "--jitflags=debug"
}
}
--- a/js/src/devtools/automation/variants/rootanalysis
+++ b/js/src/devtools/automation/variants/rootanalysis
@@ -1,8 +1,9 @@
{
- "configure-args": "--enable-debug --enable-stdcxx-compat --enable-ctypes",
+ "configure-args": "--enable-stdcxx-compat --enable-ctypes",
"optimize": true,
+ "debug": true,
"env": {
"JS_GC_ZEAL": "GenerationalGC",
"JSTESTS_EXTRA_ARGS": "--jitflags=debug"
}
}
--- a/js/src/devtools/automation/variants/tsan
+++ b/js/src/devtools/automation/variants/tsan
@@ -1,11 +1,12 @@
{
- "configure-args": "--disable-debug --enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-thread-sanitizer",
+ "configure-args": "--enable-debug-symbols='-gline-tables-only' --disable-jemalloc --enable-thread-sanitizer",
"optimize": true,
+ "debug": false,
"compiler": "clang",
"env": {
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
"JITTEST_EXTRA_ARGS": "--jitflags=debug --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt",
"TSAN_OPTIONS": "log_path={OUTDIR}/sanitize_log"
},
"max-errors": 14
--- a/js/src/devtools/automation/variants/warnaserr
+++ b/js/src/devtools/automation/variants/warnaserr
@@ -1,3 +1,4 @@
{
- "configure-args": "--enable-optimize --enable-warnings-as-errors"
+ "configure-args": "--enable-warnings-as-errors",
+ "optimize": true
}
--- a/js/src/devtools/automation/variants/warnaserrdebug
+++ b/js/src/devtools/automation/variants/warnaserrdebug
@@ -1,4 +1,4 @@
{
- "configure-args": "--enable-debug --enable-warnings-as-errors"
+ "configure-args": "--enable-warnings-as-errors",
+ "debug": true
}
-