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

Side by Side Diff: scripts/slave/chromium/layout_test_wrapper.py

Issue 1919403003: Revert of Add some code to ensure that stdout is always flushed and closed to help debug l (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A wrapper script to run layout tests on the buildbots. 6 """A wrapper script to run layout tests on the buildbots.
7 7
8 Runs the run-webkit-tests script found in third_party/WebKit/Tools/Scripts above 8 Runs the run-webkit-tests script found in third_party/WebKit/Tools/Scripts above
9 this script. For a complete list of command-line options, pass '--help' on the 9 this script. For a complete list of command-line options, pass '--help' on the
10 command line. 10 command line.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 # directory from previous test runs (i.e.- from crashes or unittest leaks). 143 # directory from previous test runs (i.e.- from crashes or unittest leaks).
144 slave_utils.RemoveChromeTemporaryFiles() 144 slave_utils.RemoveChromeTemporaryFiles()
145 145
146 try: 146 try:
147 if options.enable_pageheap: 147 if options.enable_pageheap:
148 slave_utils.SetPageHeap(build_dir, dumprendertree_exe, True) 148 slave_utils.SetPageHeap(build_dir, dumprendertree_exe, True)
149 # Run the the tests 149 # Run the the tests
150 return slave_utils.RunPythonCommandInBuildDir(build_dir, options.target, 150 return slave_utils.RunPythonCommandInBuildDir(build_dir, options.target,
151 command) 151 command)
152 finally: 152 finally:
153 if 'win_chromium_rel_ng' in sys.argv:
154 print 'layout_test_wrapper calling stdout.flush()'
155 try:
156 sys.stdout.flush()
157 finally:
158 print 'layout_test_wrapper calling stdout.close()'
159 sys.stdout.close()
160 if options.enable_pageheap: 153 if options.enable_pageheap:
161 slave_utils.SetPageHeap(build_dir, dumprendertree_exe, False) 154 slave_utils.SetPageHeap(build_dir, dumprendertree_exe, False)
162 155
163 if options.json_test_results: 156 if options.json_test_results:
164 results_dir = options.results_directory 157 results_dir = options.results_directory
165 results_json = os.path.join(results_dir, "failing_results.json") 158 results_json = os.path.join(results_dir, "failing_results.json")
166 159
167 # If the json results file was not produced, then we produce no output 160 # If the json results file was not produced, then we produce no output
168 # file too and rely on a recipe to handle this as invalid result. 161 # file too and rely on a recipe to handle this as invalid result.
169 if os.path.isfile(results_json): 162 if os.path.isfile(results_json):
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 options, args = option_parser.parse_args() 262 options, args = option_parser.parse_args()
270 options.build_dir = build_directory.GetBuildOutputDirectory() 263 options.build_dir = build_directory.GetBuildOutputDirectory()
271 264
272 # Disable pageheap checking except on Windows. 265 # Disable pageheap checking except on Windows.
273 if sys.platform != 'win32': 266 if sys.platform != 'win32':
274 options.enable_pageheap = False 267 options.enable_pageheap = False
275 return layout_test(options, args) 268 return layout_test(options, args)
276 269
277 if '__main__' == __name__: 270 if '__main__' == __name__:
278 sys.exit(main()) 271 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698