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

Unified Diff: scripts/slave/recipe_modules/chromium/steps.py

Issue 873403002: Add support for cc_perftests and other non-telemetry gtest based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Using src-side api. Created 5 years, 11 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: scripts/slave/recipe_modules/chromium/steps.py
diff --git a/scripts/slave/recipe_modules/chromium/steps.py b/scripts/slave/recipe_modules/chromium/steps.py
index dabf74409065e474aece531c49a6a5124b8827f0..7fa9e2055e66bafc343dd3ac3e212c0308fe0fab 100644
--- a/scripts/slave/recipe_modules/chromium/steps.py
+++ b/scripts/slave/recipe_modules/chromium/steps.py
@@ -103,11 +103,12 @@ class ScriptTest(Test): # pylint: disable=W0232
All new tests are strongly encouraged to use this infrastructure.
"""
- def __init__(self, name, script, all_compile_targets):
+ def __init__(self, name, script, all_compile_targets, script_args=None):
super(ScriptTest, self).__init__()
self._name = name
self._script = script
self._all_compile_targets = all_compile_targets
+ self._script_args = script_args
@property
def name(self):
@@ -139,6 +140,9 @@ class ScriptTest(Test): # pylint: disable=W0232
])
try:
+ script_args = []
+ if self._script_args:
+ script_args = ['--args', api.json.input(self._script_args)]
api.python(
name,
# Enforce that all scripts are in the specified directory
@@ -146,6 +150,7 @@ class ScriptTest(Test): # pylint: disable=W0232
api.path['checkout'].join(
'testing', 'scripts', api.path.basename(self._script)),
args=(api.chromium.get_common_args_for_scripts() +
+ script_args +
['run', '--output', api.json.output()] +
run_args),
step_test_data=lambda: api.json.test_api.output(
@@ -324,7 +329,8 @@ def generate_script(api, mastername, buildername, test_spec,
yield ScriptTest(
str(script_spec['name']),
script_spec['script'],
- scripts_compile_targets)
+ scripts_compile_targets,
+ script_spec.get('args', []))
class DynamicPerfTests(Test):

Powered by Google App Engine
This is Rietveld 408576698