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

Unified Diff: sky/tools/webkitpy/layout_tests/run_webkit_tests.py

Issue 1190223002: Make the skyanalyzer check the stocks app during testing. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/tools/webkitpy/layout_tests/port/base.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/webkitpy/layout_tests/run_webkit_tests.py
diff --git a/sky/tools/webkitpy/layout_tests/run_webkit_tests.py b/sky/tools/webkitpy/layout_tests/run_webkit_tests.py
index 6266b8ac266bafe4fb6055bc1f1aa330ca34bbb3..1096dcb683c986377ebdf2ec898588af0cb3a4f2 100644
--- a/sky/tools/webkitpy/layout_tests/run_webkit_tests.py
+++ b/sky/tools/webkitpy/layout_tests/run_webkit_tests.py
@@ -31,6 +31,7 @@
import logging
import optparse
import os
+import subprocess
import sys
import traceback
@@ -70,7 +71,7 @@ def main(argv, stdout, stderr):
return test_run_results.UNEXPECTED_ERROR_EXIT_STATUS
try:
- run_details = run(port, options, args, stderr)
+ run_details = run_tests(port, options, args, stderr)
if ((run_details.exit_code not in test_run_results.ERROR_CODES or
run_details.exit_code == test_run_results.EARLY_EXIT_STATUS) and
not run_details.initial_results.keyboard_interrupted):
@@ -81,7 +82,11 @@ def main(argv, stdout, stderr):
gen_dash_board = GenerateDashBoard(port)
gen_dash_board.generate()
- return run_details.exit_code
+ if run_details.exit_code != 0:
+ return run_details.exit_code
+
+ analyzer_result = run_analyzer(port, options, args, stderr)
+ return analyzer_result
# We need to still handle KeyboardInterrupt, atleast for webkitpy unittest cases.
except KeyboardInterrupt:
@@ -369,7 +374,7 @@ def _set_up_derived_options(port, options, args):
if not options.skipped:
options.skipped = 'default'
-def run(port, options, args, logging_stream):
+def run_tests(port, options, args, logging_stream):
logger = logging.getLogger()
logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)
@@ -386,5 +391,25 @@ def run(port, options, args, logging_stream):
finally:
printer.cleanup()
+def run_analyzer(port, options, args, logging_stream):
+ build_dir = port.analyzer_build_directory()
+ test_dir = os.path.dirname(os.path.abspath(__file__))
+ tools_dir = os.path.dirname(os.path.dirname(test_dir))
+ analyzer_path = os.path.join(tools_dir, 'skyanalyzer')
+ mojo_dir = os.path.dirname(os.path.dirname(build_dir))
abarth-chromium 2015/06/19 00:12:28 s/mojo_dir/src_dir/ We should really just compute
+ analyzer_target_path = os.path.join(mojo_dir, 'sky/examples/stocks2/lib/stock_app.dart')
+ analyzer_args = [
+ analyzer_path,
+ build_dir,
+ analyzer_target_path
+ ]
+ try:
+ output = subprocess.check_output(analyzer_args, stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ print >> logging_stream, "Analyzer found new issues:"
+ print >> logging_stream, e.output
+ return e.returncode
+ return 0
+
if __name__ == '__main__':
sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))
« no previous file with comments | « sky/tools/webkitpy/layout_tests/port/base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698