summaryrefslogtreecommitdiffstats
path: root/components/test
diff options
context:
space:
mode:
authormelandory <melandory@chromium.org>2015-05-20 09:03:30 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-20 16:03:42 +0000
commit69bcb8eb5879ab2fd4ad03665f612ccff90c1cc6 (patch)
tree40dd078f3737e2cb8bc360e88a34e93d3ce779d5 /components/test
parentb592a04d0472ceba2b783d17d1b0f360f0fe3b38 (diff)
downloadchromium_src-69bcb8eb5879ab2fd4ad03665f612ccff90c1cc6.zip
chromium_src-69bcb8eb5879ab2fd4ad03665f612ccff90c1cc6.tar.gz
chromium_src-69bcb8eb5879ab2fd4ad03665f612ccff90c1cc6.tar.bz2
[Password manager tests automation] Improves redability of code and logs.
* Removes succesfull runs from debug output. * Use named parameter in call to stopit.ThreadingTimeout, in order to make it clear that it seconds. BUG=369521 R=vabr@chromium.org Review URL: https://codereview.chromium.org/1143223002 Cr-Commit-Position: refs/heads/master@{#330743}
Diffstat (limited to 'components/test')
-rw-r--r--components/test/data/password_manager/automated_tests/run_tests.py9
1 files changed, 4 insertions, 5 deletions
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 f64a261..95cb463 100644
--- a/components/test/data/password_manager/automated_tests/run_tests.py
+++ b/components/test/data/password_manager/automated_tests/run_tests.py
@@ -91,10 +91,9 @@ def LogResultsOfTestRun(config, results):
for result in results:
website, test_case, success, reason = result
if not (config.save_only_fails and success):
- logger.debug("Test case %s has %s on Website %s", test_case,
- website, {True: "passed", False: "failed"}[success])
if not success:
- logger.debug("Reason of failure: %s", reason)
+ logger.debug("%s.%s failed with reason: %s",
+ website, test_case, reason)
if not success:
failed_tests.append("%s.%s" % (website, test_case))
@@ -120,7 +119,7 @@ def RunTestCaseOnWebsite((website, test_case, config)):
logger.log(SCRIPT_DEBUG, "Run of test case %s of website %s started",
test_case, website)
try:
- with stopit.ThreadingTimeout(100) as timeout:
+ with stopit.ThreadingTimeout(seconds=100) as timeout:
logger.log(SCRIPT_DEBUG,
"Run test with parameters: %s %s %s %s %s %s",
config.chrome_path, config.chromedriver_path,
@@ -132,7 +131,7 @@ def RunTestCaseOnWebsite((website, test_case, config)):
if timeout.state != timeout.EXECUTED:
result = (website, test_case, False,
"Got %d as timeout state (see stopit.ThreadingTimeout for"
- "the meaning of the number)" % timeout.state)
+ " the meaning of the number)" % timeout.state)
_, _, success, _ = result
if success:
return result