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

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

Issue 13985009: Remove proxy-related environment variables when running standalone tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« 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 15 matching lines...) Expand all
26 26
27 const int NO_TIMEOUT = 0; 27 const int NO_TIMEOUT = 0;
28 const int SLOW_TIMEOUT_MULTIPLIER = 4; 28 const int SLOW_TIMEOUT_MULTIPLIER = 4;
29 29
30 const int CRASHING_BROWSER_EXITCODE = -10; 30 const int CRASHING_BROWSER_EXITCODE = -10;
31 31
32 typedef void TestCaseEvent(TestCase testCase); 32 typedef void TestCaseEvent(TestCase testCase);
33 typedef void ExitCodeEvent(int exitCode); 33 typedef void ExitCodeEvent(int exitCode);
34 typedef void EnqueueMoreWork(ProcessQueue queue); 34 typedef void EnqueueMoreWork(ProcessQueue queue);
35 35
36 const List<String> EXCLUDED_ENVIRONMENT_VARIABLES =
ricow1 2013/04/12 14:39:09 Please add a statement here as to why we do this
37 const ['http_proxy', 'https_proxy', 'no_proxy',
38 'HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY'];
39
36 40
37 /** 41 /**
38 * [areByteArraysEqual] compares a range of bytes from [buffer1] with a 42 * [areByteArraysEqual] compares a range of bytes from [buffer1] with a
39 * range of bytes from [buffer2]. 43 * range of bytes from [buffer2].
40 * 44 *
41 * Returns [true] if the [count] bytes in [buffer1] (starting at 45 * Returns [true] if the [count] bytes in [buffer1] (starting at
42 * [offset1]) match the [count] bytes in [buffer2] (starting at 46 * [offset1]) match the [count] bytes in [buffer2] (starting at
43 * [offset2]). 47 * [offset2]).
44 * Otherwise [false] is returned. 48 * Otherwise [false] is returned.
45 */ 49 */
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 source.listen(destination.addAll); 1019 source.listen(destination.addAll);
1016 } 1020 }
1017 1021
1018 io.ProcessOptions _createProcessOptions() { 1022 io.ProcessOptions _createProcessOptions() {
1019 var baseEnvironment = command.environment != null ? 1023 var baseEnvironment = command.environment != null ?
1020 command.environment : io.Platform.environment; 1024 command.environment : io.Platform.environment;
1021 io.ProcessOptions options = new io.ProcessOptions(); 1025 io.ProcessOptions options = new io.ProcessOptions();
1022 options.environment = new Map<String, String>.from(baseEnvironment); 1026 options.environment = new Map<String, String>.from(baseEnvironment);
1023 options.environment['DART_CONFIGURATION'] = 1027 options.environment['DART_CONFIGURATION'] =
1024 TestUtils.configurationDir(testCase.configuration); 1028 TestUtils.configurationDir(testCase.configuration);
1029
1030 for (var excludedEnvironmentVariable in EXCLUDED_ENVIRONMENT_VARIABLES) {
1031 options.environment.remove(excludedEnvironmentVariable);
1032 }
1033
1025 return options; 1034 return options;
1026 } 1035 }
1027 } 1036 }
1028 1037
1029 class BatchRunnerProcess { 1038 class BatchRunnerProcess {
1030 Command _command; 1039 Command _command;
1031 String _executable; 1040 String _executable;
1032 List<String> _batchArguments; 1041 List<String> _batchArguments;
1033 1042
1034 io.Process _process; 1043 io.Process _process;
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 } 1731 }
1723 } 1732 }
1724 1733
1725 void eventAllTestsDone() { 1734 void eventAllTestsDone() {
1726 for (var listener in _eventListener) { 1735 for (var listener in _eventListener) {
1727 listener.allDone(); 1736 listener.allDone();
1728 } 1737 }
1729 } 1738 }
1730 } 1739 }
1731 1740
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