OLD | NEW |
---|---|
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 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2001 if (io.Platform.isLinux) { | 2001 if (io.Platform.isLinux) { |
2002 executable = 'eu-stack'; | 2002 executable = 'eu-stack'; |
2003 arguments = ['-p ${process.pid}']; | 2003 arguments = ['-p ${process.pid}']; |
2004 } else if (io.Platform.isMacOS) { | 2004 } else if (io.Platform.isMacOS) { |
2005 // Try to print stack traces of the timed out process. | 2005 // Try to print stack traces of the timed out process. |
2006 // `sample` is a sampling profiler but we ask it sample for 1 | 2006 // `sample` is a sampling profiler but we ask it sample for 1 |
2007 // second with a 4 second delay between samples so that we only | 2007 // second with a 4 second delay between samples so that we only |
2008 // sample the threads once. | 2008 // sample the threads once. |
2009 executable = '/usr/bin/sample'; | 2009 executable = '/usr/bin/sample'; |
2010 arguments = ['${process.pid}', '1', '4000', '-mayDie']; | 2010 arguments = ['${process.pid}', '1', '4000', '-mayDie']; |
2011 } else if (io.Platform.isWindows) { | |
2012 executable = "cdb.exe"; | |
kustermann
2017/02/02 13:59:23
How do you ensure the correct version of cdb.exe i
Florian Schneider
2017/02/02 18:22:02
Yes, the correct version has to be in the PATH. I
| |
2013 arguments = ['-p', '${process.pid}', '-c', '!uniqstack;qd']; | |
2011 } | 2014 } |
2012 | 2015 |
2013 if (executable != null) { | 2016 if (executable != null) { |
2014 try { | 2017 try { |
2015 var result = await io.Process.run(executable, arguments); | 2018 var result = await io.Process.run(executable, arguments); |
2016 diagnostics.addAll(result.stdout.split('\n')); | 2019 diagnostics.addAll(result.stdout.split('\n')); |
2017 diagnostics.addAll(result.stderr.split('\n')); | 2020 diagnostics.addAll(result.stderr.split('\n')); |
2018 } catch (error) { | 2021 } catch (error) { |
2019 diagnostics.add("Unable to capture stack traces: $error"); | 2022 diagnostics.add("Unable to capture stack traces: $error"); |
2020 } | 2023 } |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3341 } | 3344 } |
3342 } | 3345 } |
3343 | 3346 |
3344 void eventAllTestsDone() { | 3347 void eventAllTestsDone() { |
3345 for (var listener in _eventListener) { | 3348 for (var listener in _eventListener) { |
3346 listener.allDone(); | 3349 listener.allDone(); |
3347 } | 3350 } |
3348 _allDone(); | 3351 _allDone(); |
3349 } | 3352 } |
3350 } | 3353 } |
OLD | NEW |