Commit 5b2e8d78 authored by nednguyen's avatar nednguyen Committed by Commit bot

[tools/perf] Resolve the import error when record_wpr tries to discover benchmarks

BUG=581103

Review URL: https://codereview.chromium.org/1633143003

Cr-Commit-Position: refs/heads/master@{#371586}
parent ee683402
...@@ -6,12 +6,16 @@ import os ...@@ -6,12 +6,16 @@ import os
import sys import sys
from core import path_util
from chrome_telemetry_build import chromium_config from chrome_telemetry_build import chromium_config
sys.path.append(chromium_config.GetTelemetryDir()) sys.path.append(chromium_config.GetTelemetryDir())
from telemetry import record_wpr from telemetry import record_wpr
# This is required to resolve importing davclient in tools/perf/third_party/
# when record_wpr try to dynamically discover benchmark classes.
import third_party # pylint: disable=unused-import
if __name__ == '__main__': if __name__ == '__main__':
_perf_dir = os.path.dirname(__file__) sys.exit(record_wpr.Main(path_util.GetPerfDir()))
sys.exit(record_wpr.Main(_perf_dir))
...@@ -9,8 +9,6 @@ import sys ...@@ -9,8 +9,6 @@ import sys
import tempfile import tempfile
import unittest import unittest
from telemetry import decorators
class ScriptsSmokeTest(unittest.TestCase): class ScriptsSmokeTest(unittest.TestCase):
...@@ -50,7 +48,6 @@ class ScriptsSmokeTest(unittest.TestCase): ...@@ -50,7 +48,6 @@ class ScriptsSmokeTest(unittest.TestCase):
self.assertEquals(return_code, 0, stdout) self.assertEquals(return_code, 0, stdout)
self.assertIn('optional arguments:', stdout) self.assertIn('optional arguments:', stdout)
@decorators.Disabled('all') # crbug.com/581103
def testRunRecordWprList(self): def testRunRecordWprList(self):
return_code, stdout = self.RunPerfScript('record_wpr --list-benchmarks') return_code, stdout = self.RunPerfScript('record_wpr --list-benchmarks')
# TODO(nednguyen): Remove this once we figure out why importing # TODO(nednguyen): Remove this once we figure out why importing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment