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

Unified Diff: components/test/data/password_manager/automated_tests/run_tests.py

Issue 994573002: [Password manager tests automation] Add ability to run single test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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: components/test/data/password_manager/automated_tests/run_tests.py
diff --git a/components/test/data/password_manager/automated_tests/run_tests.py b/components/test/data/password_manager/automated_tests/run_tests.py
index eb2450a8b8547780340223aedcf4f0298a70cf18..28aac58f7b7efd5d27bdfa99adb2d254b41942f8 100644
--- a/components/test/data/password_manager/automated_tests/run_tests.py
+++ b/components/test/data/password_manager/automated_tests/run_tests.py
@@ -205,7 +205,6 @@ def _apply_defaults(config, defaults):
def run_tests(config_path):
""" Runs automated tests. """
environment = Environment("", "", "", None, False)
- tests.Tests(environment)
defaults = { ("output", "save-path"): "/dev/null",
("run_options", "tests_in_parallel"): "1",
("run_options", "write_to_sheet"): "false" }
@@ -223,11 +222,12 @@ def run_tests(config_path):
"--chromedriver-path", config.get("binaries", "chromedriver-path"),
"--passwords-path", config.get("data_files", "passwords_path")]
runners = []
- tests_to_run = [test.name for test in environment.websitetests]
if config.has_option("run_options", "tests_to_run"):
user_selected_tests = config.get("run_options", "tests_to_run").split(',')
- # TODO((dvadym) Validate the user selected tests are available.
- tests_to_run = list(set(tests_to_run) & set(user_selected_tests))
+ tests_to_run = user_selected_tests
vabr (Chromium) 2015/03/09 14:52:17 You know Python better than me, so this is just to
melandory 2015/03/09 15:00:27 Variable scope is determined by function or module
vabr (Chromium) 2015/03/09 15:02:28 Acknowledged.
+ else:
+ tests.Tests(environment)
+ tests_to_run = [test.name for test in environment.websitetests]
with open(config.get("output", "save-path"), 'w') as savefile:
print "Tests to run %d\nTests: %s" % (len(tests_to_run), tests_to_run)

Powered by Google App Engine
This is Rietveld 408576698