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

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

Issue 286543004: [telemetry] Fix testPageSetSmoke. The archive_data_file should be relative to the page set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base_dir Created 6 years, 7 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
Index: tools/telemetry/telemetry/test_util/page_set_smoke_test.py
diff --git a/tools/telemetry/telemetry/test_util/page_set_smoke_test.py b/tools/telemetry/telemetry/test_util/page_set_smoke_test.py
deleted file mode 100644
index 00d1a4bef05dab168680f57f34a6803c387f31fb..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/test_util/page_set_smoke_test.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import logging
-import os
-import unittest
-
-from telemetry.core import discover
-from telemetry.page import page_set as page_set_module
-from telemetry.page import page_set_archive_info
-
-
-class PageSetSmokeTest(unittest.TestCase):
-
- def RunSmokeTest(self, page_sets_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.
- """
- # Instantiate all page sets and verify that all URLs have an associated
- # archive.
- page_sets = discover.GetAllPageSetFilenames(page_sets_dir)
- for path in page_sets:
- page_set = page_set_module.PageSet.FromFile(path)
-
- # TODO: Eventually these should be fatal.
- if not page_set.archive_data_file:
- logging.warning('Skipping %s: missing archive data file', path)
- continue
- if not os.path.exists(os.path.join(page_sets_dir,
- page_set.archive_data_file)):
- logging.warning('Skipping %s: archive data file not found', path)
- continue
-
- wpr_archive_info = page_set_archive_info.PageSetArchiveInfo.FromFile(
- os.path.join(page_sets_dir, page_set.archive_data_file),
- ignore_archive=True)
-
- logging.info('Testing %s', path)
- for page in page_set.pages:
- if not page.url.startswith('http'):
- continue
- self.assertTrue(wpr_archive_info.WprFilePathForPage(page),
- msg='No archive found for %s in %s' % (
- page.url, page_set.archive_data_file))
« no previous file with comments | « tools/telemetry/telemetry/test_util/__init__.py ('k') | tools/telemetry/telemetry/unittest/page_set_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698