aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool/run_bisect.py
diff options
context:
space:
mode:
Diffstat (limited to 'binary_search_tool/run_bisect.py')
-rwxr-xr-xbinary_search_tool/run_bisect.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/binary_search_tool/run_bisect.py b/binary_search_tool/run_bisect.py
index ef1048bb..249b9cf5 100755
--- a/binary_search_tool/run_bisect.py
+++ b/binary_search_tool/run_bisect.py
@@ -12,6 +12,7 @@ import abc
import argparse
from argparse import RawTextHelpFormatter
import os
+import shlex
import sys
from binary_search_tool import binary_search_state
@@ -141,8 +142,8 @@ class BisectPackage(Bisector):
'prune': True,
'file_args': True
}
- self.setup_cmd = ('%s %s %s' % (self.cros_pkg_setup, self.options.board,
- self.options.remote))
+ self.setup_cmd = ' '.join(
+ (self.cros_pkg_setup, self.options.board, self.options.remote))
self.ArgOverride(self.default_kwargs, self.overrides)
def PreRun(self):
@@ -192,9 +193,10 @@ class BisectObject(Bisector):
if options.dir:
os.environ['BISECT_DIR'] = options.dir
self.options.dir = os.environ.get('BISECT_DIR', '/tmp/sysroot_bisect')
- self.setup_cmd = (
- '%s %s %s %s' % (self.sysroot_wrapper_setup, self.options.board,
- self.options.remote, self.options.package))
+ self.setup_cmd = ' '.join(
+ (self.sysroot_wrapper_setup, self.options.board, self.options.remote,
+ self.options.package, str(self.options.reboot).lower(),
+ shlex.quote(self.options.use_flags)))
self.ArgOverride(self.default_kwargs, overrides)
@@ -253,8 +255,8 @@ class BisectAndroid(Bisector):
if self.options.device_id:
device_id = "ANDROID_SERIAL='%s'" % self.options.device_id
- self.setup_cmd = ('%s %s %s %s' % (num_jobs, device_id, self.android_setup,
- self.options.android_src))
+ self.setup_cmd = ' '.join(
+ (num_jobs, device_id, self.android_setup, self.options.android_src))
self.ArgOverride(self.default_kwargs, overrides)
@@ -344,6 +346,16 @@ def Main(argv):
parser_object.add_argument('remote', help='Remote machine to test on')
parser_object.add_argument('package', help='Package to emerge and test')
parser_object.add_argument(
+ '--use_flags',
+ required=False,
+ default='',
+ help='Use flags passed to emerge')
+ parser_object.add_argument(
+ '--noreboot',
+ action='store_false',
+ dest='reboot',
+ help='Do not reboot after updating the package (default: False)')
+ parser_object.add_argument(
'--dir',
help=('Bisection directory to use, sets '
'$BISECT_DIR if provided. Defaults to '