Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: tools/telemetry/telemetry/unittest/page_set_smoke_test.py

Issue 311193003: [telemetry] Cleanups for benchmarks importing page sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove description fo' realz. (from gpu tests) Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/test.py ('k') | tools/telemetry/unittest_data/test_page_set.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/unittest/page_set_smoke_test.py
diff --git a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
index b5e22aed033d60324a8fdbf826379e87cb193fc7..51c8a99c341ce08265c6a5ca0a5b0b2de23e4f9c 100644
--- a/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
+++ b/tools/telemetry/telemetry/unittest/page_set_smoke_test.py
@@ -67,10 +67,6 @@ class PageSetSmokeTest(unittest.TestCase):
msg='page_set %\'s file_path must have type string')
self.assertTrue(
- isinstance(page_set.description, str),
- msg='page_set\'s description must have type string')
-
- self.assertTrue(
isinstance(page_set.archive_data_file, str),
msg='page_set\'s archive_data_file path must have type string')
@@ -99,16 +95,16 @@ class PageSetSmokeTest(unittest.TestCase):
isinstance(page.name, str),
msg='page %s \'s name field must have type string' % page.display_name)
- def RunSmokeTest(self, page_sets_dir):
+ def RunSmokeTest(self, page_sets_dir, top_level_dir):
"""Run smoke test on all page sets in page_sets_dir.
Subclass of PageSetSmokeTest is supposed to call this in some test
method to run smoke test.
"""
- page_sets = discover.GetAllPageSetFilenames(page_sets_dir)
-
- for page_set_path in page_sets:
- page_set = page_set_module.PageSet.FromFile(page_set_path)
+ page_sets = discover.DiscoverClasses(page_sets_dir, top_level_dir,
+ page_set_module.PageSet).values()
+ for page_set_class in page_sets:
+ page_set = page_set_class()
logging.info('Testing %s', page_set.file_path)
self.CheckArchive(page_set)
self.CheckCredentials(page_set)
« no previous file with comments | « tools/telemetry/telemetry/test.py ('k') | tools/telemetry/unittest_data/test_page_set.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698