Index: tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py |
=================================================================== |
--- tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py (revision 222891) |
+++ tools/telemetry/telemetry/page/buildbot_page_measurement_results_unittest.py (working copy) |
@@ -4,10 +4,15 @@ |
import os |
import unittest |
+from telemetry.core import util |
from telemetry.page import buildbot_page_measurement_results |
from telemetry.page import page_set |
-from telemetry.page import perf_tests_helper |
+# Get build scripts into our path. |
+util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'util', 'lib') |
+from common import perf_result_data_type # pylint: disable=F0401 |
+from common import perf_tests_results_helper # pylint: disable=F0401 |
+ |
def _MakePageSet(): |
return page_set.PageSet.FromDict({ |
"description": "hello", |
@@ -26,7 +31,8 @@ |
self.results = [] |
def _PrintPerfResult(self, *args): |
- res = perf_tests_helper.PrintPerfResult(*args, print_to_stdout=False) |
+ res = perf_tests_results_helper.PrintPerfResult(*args, |
+ print_to_stdout=False) |
self.results.append(res) |
class BuildbotPageMeasurementResultsTest(unittest.TestCase): |
@@ -256,13 +262,13 @@ |
measurement_results.WillMeasurePage(test_page_set.pages[0]) |
measurement_results.Add('a', 'units', |
'{"buckets": [{"low": 1, "high": 2, "count": 1}]}', |
- data_type='histogram') |
+ data_type=perf_result_data_type.HISTOGRAM) |
measurement_results.DidMeasurePage() |
measurement_results.WillMeasurePage(test_page_set.pages[1]) |
measurement_results.Add('a', 'units', |
'{"buckets": [{"low": 2, "high": 3, "count": 1}]}', |
- data_type='histogram') |
+ data_type=perf_result_data_type.HISTOGRAM) |
measurement_results.DidMeasurePage() |
measurement_results.PrintSummary() |