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

Unified Diff: tools/telemetry/telemetry/test.py

Issue 22325006: Revert "Revert 215542 "[Telemetry] Add HTML output and make it the default."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/page/page_measurement.py ('k') | tools/telemetry/telemetry/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/test.py
diff --git a/tools/telemetry/telemetry/test.py b/tools/telemetry/telemetry/test.py
index 1edf35b4000c5fc6ecda1722b24a4ea4fc519e9d..df74a2a5678d4b495980fe5ce27eb50e2bd3b507 100644
--- a/tools/telemetry/telemetry/test.py
+++ b/tools/telemetry/telemetry/test.py
@@ -2,23 +2,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
-import sys
from telemetry.core import repeat_options
+from telemetry.core import util
from telemetry.page import page_runner
from telemetry.page import page_set
from telemetry.page import page_test
from telemetry.page import test_expectations
-def GetBaseDir():
- main_module = sys.modules['__main__']
- if hasattr(main_module, '__file__'):
- return os.path.dirname(os.path.abspath(main_module.__file__))
- else:
- return os.getcwd()
-
-
class Test(object):
"""Base class for a Telemetry test or benchmark.
@@ -60,7 +52,8 @@ class Test(object):
page_set attribute. Override to generate a custom page set.
"""
assert hasattr(self, 'page_set'), 'This test has no "page_set" attribute.'
- return page_set.PageSet.FromFile(os.path.join(GetBaseDir(), self.page_set))
+ return page_set.PageSet.FromFile(
+ os.path.join(util.GetBaseDir(), self.page_set))
def CreateExpectations(self, ps): # pylint: disable=W0613
"""Get the expectations this test will run with.
« no previous file with comments | « tools/telemetry/telemetry/page/page_measurement.py ('k') | tools/telemetry/telemetry/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698