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

Unified Diff: tools/telemetry/telemetry/internal/backends/mandoline/config.py

Issue 1252253003: Support Telemetry tests on Android Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@7_android_tele
Patch Set: Created 5 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
Index: tools/telemetry/telemetry/internal/backends/mandoline/config.py
diff --git a/mojo/tools/mopy/config.py b/tools/telemetry/telemetry/internal/backends/mandoline/config.py
similarity index 93%
copy from mojo/tools/mopy/config.py
copy to tools/telemetry/telemetry/internal/backends/mandoline/config.py
index 4b17c2dee83a2e35e28c70bb0dce74ee7d4ed601..2ff513c1c76dc442831ee8f98540b9a4446dfe18 100644
--- a/mojo/tools/mopy/config.py
+++ b/tools/telemetry/telemetry/internal/backends/mandoline/config.py
@@ -2,6 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# TODO(yzshen): Once the dep manager is ready, remove this file and use the one
+# from src/mojo/tools directly.
+
import ast
import os.path
@@ -81,7 +84,7 @@ class Config(object):
def _ParseGNArgs(self):
'''Parse the gn config file from the build directory, if it exists.'''
- TRANSLATIONS = { 'true': 'True', 'false': 'False', }
+ TRANSLATIONS = {'true': 'True', 'false': 'False',}
if self.values['build_dir'] is None:
return
gn_file = os.path.join(self.values['build_dir'], 'args.gn')
@@ -90,8 +93,8 @@ class Config(object):
with open(gn_file, 'r') as f:
for line in f:
- line = re.sub('\s*#.*', '', line)
- result = re.match('^\s*(\w+)\s*=\s*(.*)\s*$', line)
+ line = re.sub(r'\s*#.*', '', line)
+ result = re.match(r'^\s*(\w+)\s*=\s*(.*)\s*$', line)
if result:
key = result.group(1)
value = result.group(2)

Powered by Google App Engine
This is Rietveld 408576698