Chromium Code Reviews| Index: tools/perf/benchmarks/benchmark_smoke_unittest.py |
| diff --git a/tools/perf/benchmarks/benchmark_smoke_unittest.py b/tools/perf/benchmarks/benchmark_smoke_unittest.py |
| index e8e7bd9c325b434bc73c21f89d37e4de3c1e7c7f..6310cf20a9b9e1a882ff8a041559eb85906ed8e1 100644 |
| --- a/tools/perf/benchmarks/benchmark_smoke_unittest.py |
| +++ b/tools/perf/benchmarks/benchmark_smoke_unittest.py |
| @@ -137,23 +137,23 @@ def load_tests(loader, standard_tests, pattern): |
| # Merge decorators. |
| for attribute in ['_enabled_strings', '_disabled_strings']: |
| # Do set union of attributes to eliminate duplicates. |
| - merged_attributes = list(set(getattr(method, attribute, []) + |
| - getattr(benchmark, attribute, []))) |
| + merged_attributes = getattr(method, attribute, set()).union( |
| + getattr(benchmark, attribute, set())) |
| if merged_attributes: |
| setattr(method, attribute, merged_attributes) |
| # Handle the case where the benchmark is Enabled/Disabled everywhere. |
| - if (getattr(method, attribute, None) == [] or |
| - getattr(benchmark, attribute, None) == []): |
| - setattr(method, attribute, []) |
| + if (getattr(method, attribute, None) or |
|
aiolos (Not reviewing)
2015/11/06 18:37:39
Shouldn't this be
if (not getattr(...) or
no
nednguyen
2015/11/06 18:47:24
Done. Good catch
|
| + getattr(benchmark, attribute, None)): |
| + setattr(method, attribute, set()) |
| # Disable some tests on android platform only. |
| if sys.modules[benchmark.__module__] in _ANDROID_BLACK_LIST_MODULES: |
| - method._disabled_strings.append('android') |
| + method._disabled_strings.add('android') |
| # TODO(bashi): Remove once crrev.com/1266833004 is landed. |
| if benchmark.Name() == 'memory.blink_memory_mobile': |
| - method._disabled_strings.append('android') |
| + method._disabled_strings.add('android') |
| setattr(BenchmarkSmokeTest, benchmark.Name(), method) |