summaryrefslogtreecommitdiffstats
path: root/build/android/enable_asserts.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/android/enable_asserts.py')
-rwxr-xr-xbuild/android/enable_asserts.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/build/android/enable_asserts.py b/build/android/enable_asserts.py
index 8fb7dca..b33e212 100755
--- a/build/android/enable_asserts.py
+++ b/build/android/enable_asserts.py
@@ -9,12 +9,15 @@
import argparse
import sys
+from pylib.device import device_blacklist
from pylib.device import device_utils
def main():
parser = argparse.ArgumentParser()
+ parser.add_argument('--blacklist-file', help='Device blacklist JSON file.')
+
set_asserts_group = parser.add_mutually_exclusive_group(required=True)
set_asserts_group.add_argument(
'--enable_asserts', dest='set_asserts', action='store_true',
@@ -25,9 +28,15 @@ def main():
args = parser.parse_args()
+ if args.blacklist_file:
+ blacklist = device_blacklist.Blacklist(args.blacklist_file)
+ else:
+ blacklist = None
+
# TODO(jbudorick): Accept optional serial number and run only for the
# specified device when present.
- devices = device_utils.DeviceUtils.parallel()
+ devices = device_utils.DeviceUtils.parallel(
+ device_utils.DeviceUtils.HealthyDevices(blacklist))
def set_java_asserts_and_restart(device):
if device.SetJavaAsserts(args.set_asserts):