Fix test annotation processing on ints.
Bug: 1019707 Change-Id: Ia138c008fd201263d86f22fbafecb0ccf3406ec5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891586 Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Sky Malice <skym@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#714279} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 30075d769a5c6cd4428d6c32881765db48a0e0a2
This commit is contained in:
Родитель
0a6fe6897a
Коммит
407a2144e3
|
@ -246,7 +246,13 @@ def FilterTests(tests, filter_str=None, annotations=None,
|
|||
if filter_av is None:
|
||||
return True
|
||||
elif isinstance(av, dict):
|
||||
return filter_av in av['value']
|
||||
tav_from_dict = av['value']
|
||||
# If tav_from_dict is an int, the 'in' operator breaks, so convert
|
||||
# filter_av and manually compare. See https://crbug.com/1019707
|
||||
if isinstance(tav_from_dict, int):
|
||||
return int(filter_av) == tav_from_dict
|
||||
else:
|
||||
return filter_av in tav_from_dict
|
||||
elif isinstance(av, list):
|
||||
return filter_av in av
|
||||
return filter_av == av
|
||||
|
|
Загрузка…
Ссылка в новой задаче