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

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 2383553002: Only collect 1 stack trace when a test timeouts on mac (Closed)
Patch Set: Created 4 years, 2 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 }) 1863 })
1864 .catchError( 1864 .catchError(
1865 (error) => print("Error when printing stack trace: $error")) 1865 (error) => print("Error when printing stack trace: $error"))
1866 .whenComplete(() { 1866 .whenComplete(() {
1867 if (!process.kill()) { 1867 if (!process.kill()) {
1868 DebugLogger.error("Unable to kill ${process.pid}"); 1868 DebugLogger.error("Unable to kill ${process.pid}");
1869 } 1869 }
1870 }); 1870 });
1871 } else if (io.Platform.isMacOS) { 1871 } else if (io.Platform.isMacOS) {
1872 // Try to print stack traces of the timed out process. 1872 // Try to print stack traces of the timed out process.
1873 // `sample` is a sampling profiler but we ask it sample for 1
1874 // second with a 4 second delay between samples so that we only
1875 // sample the threads once.
1873 io.Process.run('/usr/bin/sample', 1876 io.Process.run('/usr/bin/sample',
1874 ['${process.pid}', '1', '1', '-mayDie']) 1877 ['${process.pid}', '1', '4000', '-mayDie'])
1875 .then((result) { 1878 .then((result) {
1876 io.stdout.write(result.stdout); 1879 io.stdout.write(result.stdout);
1877 io.stderr.write(result.stderr); 1880 io.stderr.write(result.stderr);
1878 }) 1881 })
1879 .catchError( 1882 .catchError(
1880 (error) => print("Error when printing stack trace: $error")) 1883 (error) => print("Error when printing stack trace: $error"))
1881 .whenComplete(() { 1884 .whenComplete(() {
1882 if (!process.kill()) { 1885 if (!process.kill()) {
1883 DebugLogger.error("Unable to kill ${process.pid}"); 1886 DebugLogger.error("Unable to kill ${process.pid}");
1884 } 1887 }
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 } 3078 }
3076 } 3079 }
3077 3080
3078 void eventAllTestsDone() { 3081 void eventAllTestsDone() {
3079 for (var listener in _eventListener) { 3082 for (var listener in _eventListener) {
3080 listener.allDone(); 3083 listener.allDone();
3081 } 3084 }
3082 _allDone(); 3085 _allDone();
3083 } 3086 }
3084 } 3087 }
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