[tools][gm] Fix aliases for modes with a suffix
Minor bug fix in alias support (crrev.com/c/3723506), which broke modes with suffixes, e.g. x64.release-css or x64.rel-css No-Try: True Change-Id: I16fdc83dde269f66f4bb7260de0d2649aaece27e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732929 Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#81541}
This commit is contained in:
parent
16b5842425
commit
e8cea8c876
@ -484,11 +484,16 @@ class ArgumentParser(object):
|
||||
targets.append(word)
|
||||
elif word in ACTIONS:
|
||||
actions.append(word)
|
||||
elif any(word.startswith(mode + "-") for mode in MODES.keys()):
|
||||
modes.append(MODES[word])
|
||||
else:
|
||||
print("Didn't understand: %s" % word)
|
||||
sys.exit(1)
|
||||
for mode in MODES.keys():
|
||||
if word.startswith(mode + "-"):
|
||||
prefix = word[:len(mode)]
|
||||
suffix = word[len(mode) + 1:]
|
||||
modes.append(MODES[prefix] + "-" + suffix)
|
||||
break
|
||||
else:
|
||||
print("Didn't understand: %s" % word)
|
||||
sys.exit(1)
|
||||
# Process actions.
|
||||
for action in actions:
|
||||
impact = ACTIONS[action]
|
||||
|
Loading…
Reference in New Issue
Block a user