bisect-kit: simplify command line path options
1. rename command line options, make them shorter and easier to
remember
2. more importantly, diagnose_cros_autotest.py shares the same default
path as setup_cros_bisect.py, so users can omit them by convention
For example, to bisect crbug/891993, the full command lines are,
# sync trees
./setup_cros_bisect.py sync
# create new checkout trees for this bisect session
./setup_cros_bisect.py new --session=891993
# one line to find the culprit
./diagnose_cros_autotest.py --session=891993 \
--old R71-11118.0.0 --new R71-11119.0.0 \
cheets_PerfBootServer --metric boot_progress_ams_ready \
--old_value 6642 --new_value 11651 \
:lab: --board kevin --sku kevin_rk3399_4Gb
# delete trees no longer needed
./setup_cros_bisect.py delete --session=891993
BUG=None
TEST=run above command line
Change-Id: I7cc1b00317c0bdb346e77e50b9690bde079d6191
Reviewed-on: https://chromium-review.googlesource.com/1258942
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
diff --git a/bisect_cros_repo.py b/bisect_cros_repo.py
index 8a91708..08574a9 100755
--- a/bisect_cros_repo.py
+++ b/bisect_cros_repo.py
@@ -8,7 +8,7 @@
Example:
$ ./bisect_cros_repo.py init --old rev1 --new rev2 \\
--chromeos_root ~/chromiumos \\
- --chromeos_repo_mirror_dir $CHROMEOS_REPO_MIRROR_DIR
+ --chromeos_mirror $CHROMEOS_MIRROR
$ ./bisect_cros_repo.py config switch ./switch_cros_localbuild.py
$ ./bisect_cros_repo.py config eval ./eval-manually.sh
$ ./bisect_cros_repo.py run
@@ -62,9 +62,9 @@
default=configure.get('CHROMEOS_ROOT'),
help='ChromeOS tree root')
parser.add_argument(
- '--chromeos_repo_mirror_dir',
+ '--chromeos_mirror',
type=cli.argtype_dir_path,
- default=configure.get('CHROMEOS_REPO_MIRROR_DIR', ''),
+ default=configure.get('CHROMEOS_MIRROR', ''),
help='ChromeOS repo mirror path')
@staticmethod
@@ -94,10 +94,10 @@
dut=opts.dut,
board=opts.board,
chromeos_root=opts.chromeos_root,
- chromeos_repo_mirror_dir=opts.chromeos_repo_mirror_dir)
+ chromeos_mirror=opts.chromeos_mirror)
spec_manager = cros_util.ChromeOSSpecManager(config)
- cache = repo_util.RepoMirror(opts.chromeos_repo_mirror_dir)
+ cache = repo_util.RepoMirror(opts.chromeos_mirror)
# Make sure all repos in between are cached
float_specs = spec_manager.collect_float_spec(opts.old, opts.new)
@@ -121,7 +121,7 @@
if self.config['board']:
env['BOARD'] = self.config['board']
env['CHROMEOS_ROOT'] = self.config['chromeos_root']
- env['CHROMEOS_REPO_MIRROR_DIR'] = self.config['chromeos_repo_mirror_dir']
+ env['CHROMEOS_MIRROR'] = self.config['chromeos_mirror']
env['INTRA_REV'] = rev
def view(self, old, new):
@@ -129,7 +129,7 @@
print('new', new)
spec_manager = cros_util.ChromeOSSpecManager(self.config)
- cache = repo_util.RepoMirror(self.config['chromeos_repo_mirror_dir'])
+ cache = repo_util.RepoMirror(self.config['chromeos_mirror'])
code_manager = codechange.CodeManager(self.config['chromeos_root'],
spec_manager, cache)
code_manager.view_rev_diff(old, new)