Bug 1348796 - Make debug overridable in autospider.py. r=arai, a=test-only
authorSteve Fink <sfink@mozilla.com>
Mon, 20 Mar 2017 10:04:52 -0700
changeset 395480 8dc2b4bb0c68d84e4429ce71ef0dbdcc35cd7a81
parent 395479 943599d7737f6ad9393e54caba3f3c9222607bed
child 395481 421f65e89a85a685168f4af3c5ca7e832c0b8346
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai, test-only
bugs1348796
milestone54.0a2
Bug 1348796 - Make debug overridable in autospider.py. r=arai, a=test-only
js/src/devtools/automation/autospider.py
js/src/devtools/automation/variants/arm-sim
js/src/devtools/automation/variants/arm-sim-osx
js/src/devtools/automation/variants/arm64-sim
js/src/devtools/automation/variants/asan
js/src/devtools/automation/variants/compacting
js/src/devtools/automation/variants/dtrace
js/src/devtools/automation/variants/msan
js/src/devtools/automation/variants/nonunified
js/src/devtools/automation/variants/plaindebug
js/src/devtools/automation/variants/rootanalysis
js/src/devtools/automation/variants/tsan
js/src/devtools/automation/variants/warnaserr
js/src/devtools/automation/variants/warnaserrdebug
--- 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',
@@ -140,22 +147,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' + ('' if AUTOMATION else ' -s'))
 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
 }
-