Commit 4b87d1be authored by bsheedy's avatar bsheedy Committed by Commit Bot

Improve VR bisect initial value generation

Forces the VR bisect script to use a detached head state when
determining initial values. This prevents us from accidentally dirtying
the current branch if --apply-stash-before-sync is used, while also
fixing an issue with --apply-stash-before-sync if both the good and bad
values need to be determined where the stash application from the good
run would still be around during the bad run.

Change-Id: I039959a3bdd3d9fff56a32e19097b03c946c5838
Reviewed-on: https://chromium-review.googlesource.com/1017313
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551790}
parent 23bef1af
......@@ -498,10 +498,16 @@ def BisectRegression(args, unknown_args):
os.environ['DOWNLOAD_VR_TEST_APKS'] = '1'
try:
if args.good_value == None:
# Once we've run "git bisect start" and set the good/bad revisions,
# we'll be in a detached head state before we sync. However, the git
# bisect has to start after this point, so we can't use that behavior
# here. So, manually sync to the revision to get into a detached state.
subprocess.check_output(['git', 'checkout', args.good_revision])
args.good_value = GetValueAtRevision(args, unknown_args,
args.good_revision, output_dir)
print '=== Got initial good value of %f ===' % args.good_value
if args.bad_value == None:
subprocess.check_output(['git', 'checkout', args.bad_revision])
args.bad_value = GetValueAtRevision(args, unknown_args,
args.bad_revision, output_dir)
print '=== Got initial bad value of %f ===' % args.bad_value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment