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_android_repo.py b/bisect_android_repo.py
index 13aaf4f..73c0ce0 100755
--- a/bisect_android_repo.py
+++ b/bisect_android_repo.py
@@ -8,7 +8,7 @@
 Example:
   $ ./bisect_android_repo.py init --old rev1 --new rev2 \\
       --android_root ~/android \\
-      --android_repo_mirror_dir $ANDROID_REPO_MIRROR_DIR
+      --android_mirror $ANDROID_MIRROR
   $ ./bisect_android_repo.py config switch ./switch_arc_localbuild.py
   $ ./bisect_android_repo.py config eval ./eval-manually.sh
   $ ./bisect_android_repo.py run
@@ -84,10 +84,10 @@
         default=configure.get('ANDROID_ROOT'),
         help='Android tree root')
     parser.add_argument(
-        '--android_repo_mirror_dir',
+        '--android_mirror',
         type=cli.argtype_dir_path,
         required=True,
-        default=configure.get('ANDROID_REPO_MIRROR_DIR'),
+        default=configure.get('ANDROID_MIRROR'),
         help='Android repo mirror path')
     parser.add_argument(
         '--branch',
@@ -139,14 +139,14 @@
     config = dict(
         dut=opts.dut,
         android_root=opts.android_root,
-        android_repo_mirror_dir=opts.android_repo_mirror_dir,
+        android_mirror=opts.android_mirror,
         branch=opts.branch,
         flavor=opts.flavor,
         old=old,
         new=new)
 
     spec_manager = android_util.AndroidSpecManager(config)
-    cache = repo_util.RepoMirror(opts.android_repo_mirror_dir)
+    cache = repo_util.RepoMirror(opts.android_mirror)
 
     # Make sure all repos in between are cached
     float_specs = spec_manager.collect_float_spec(old, new)
@@ -169,7 +169,7 @@
     env['ANDROID_ROOT'] = self.config['android_root']
     env['ANDROID_FLAVOR'] = self.config['flavor']
     env['ANDROID_BRANCH'] = self.config['branch']
-    env['ANDROID_REPO_MIRROR_DIR'] = self.config['android_repo_mirror_dir']
+    env['ANDROID_MIRROR'] = self.config['android_mirror']
     env['INTRA_REV'] = rev
 
   def view(self, old, new):
@@ -190,7 +190,7 @@
           flavor=self.config['flavor']))
 
     spec_manager = android_util.AndroidSpecManager(self.config)
-    cache = repo_util.RepoMirror(self.config['android_repo_mirror_dir'])
+    cache = repo_util.RepoMirror(self.config['android_mirror'])
     code_manager = codechange.CodeManager(self.config['android_root'],
                                           spec_manager, cache)
     code_manager.view_rev_diff(old, new)