()
| 116 | |
| 117 | |
| 118 | def main(): |
| 119 | parser = argparse.ArgumentParser( |
| 120 | description="Bisect a roll CL using a CQ bot") |
| 121 | parser.add_argument( |
| 122 | "roll", |
| 123 | nargs='?', |
| 124 | help="The roll CL (default: find the most recent active roll)", |
| 125 | default=None) |
| 126 | parser.add_argument( |
| 127 | "bot", |
| 128 | nargs='?', |
| 129 | help="The bot to test, e.g. chromium/try/chromeos-amd64-generic-rel (default: find the most-often crashing, shortest running, existing failing bot on the given roll CL)", |
| 130 | default=None) |
| 131 | parser.add_argument( |
| 132 | "-s", |
| 133 | "--start", |
| 134 | default=None, |
| 135 | help="The start V8 git commit for the bissect (the last known good commit). This is assumed to be good and is not tested. Defaults to the V8 commit as it was before the roll." |
| 136 | ) |
| 137 | parser.add_argument( |
| 138 | "-e", |
| 139 | "--end", |
| 140 | default=None, |
| 141 | help="The end V8 git commit for the bisect (the first known bad commit). This is assumed to be bad and is not tested. Defaults to the V8 commit the roll is rolling to." |
| 142 | ) |
| 143 | |
| 144 | options = parser.parse_args() |
| 145 | |
| 146 | roll = options.roll |
| 147 | if roll is None: |
| 148 | print("Looking for latest roll CL...") |
| 149 | changes = gerrit_util.QueryChanges( |
| 150 | GERRIT_HOST, [("owner", ROLLER_BOT_EMAIL), ("project", "chromium/src"), |
| 151 | ("status", "NEW")], |
| 152 | "Roll V8 from", |
| 153 | limit=1) |
| 154 | if len(changes) < 1: |
| 155 | print("Didn't find a CL that looks like an active roll") |
| 156 | return 1 |
| 157 | if len(changes) > 1: |
| 158 | print("Found multiple CLs that look like an active roll:") |
| 159 | for change in changes: |
| 160 | print(" * %s: https://%s/c/%s" % |
| 161 | (change['subject'], GERRIT_HOST, change['_number'])) |
| 162 | return 1 |
| 163 | |
| 164 | roll_change = changes[0] |
| 165 | roll = roll_change["_number"] |
| 166 | |
| 167 | roll_change = gerrit_util.GetChangeDetail(GERRIT_HOST, roll, |
| 168 | ["CURRENT_REVISION"]) |
| 169 | subject = roll_change['subject'] |
| 170 | print("Found: %s" % subject) |
| 171 | |
| 172 | m = re.match(r"Roll V8 from ([0-9a-f]+) to ([0-9a-f]+)", subject) |
| 173 | if not m: |
| 174 | print("CL subject is not of the form \"Roll V8 from 123abc to 456def\"") |
| 175 | return 1 |
no test coverage detected
searching dependent graphs…