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

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

Issue 3005013002: Added json result of test output to output debug directory. (Closed)
Patch Set: Added changes from Bill Created 3 years, 3 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 | tools/testing/dart/options.dart » ('j') | 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'compiler_configuration.dart'; 9 import 'compiler_configuration.dart';
10 import 'http_server.dart'; 10 import 'http_server.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this.resetBrowser, 45 this.resetBrowser,
46 this.skipCompilation, 46 this.skipCompilation,
47 this.useBlobs, 47 this.useBlobs,
48 this.useSdk, 48 this.useSdk,
49 this.useFastStartup, 49 this.useFastStartup,
50 this.useEnableAsserts, 50 this.useEnableAsserts,
51 this.useDart2JSWithKernel, 51 this.useDart2JSWithKernel,
52 this.useDart2JSWithKernelInSsa, 52 this.useDart2JSWithKernelInSsa,
53 this.writeDebugLog, 53 this.writeDebugLog,
54 this.writeTestOutcomeLog, 54 this.writeTestOutcomeLog,
55 this.writeResultLog,
55 this.drtPath, 56 this.drtPath,
56 this.chromePath, 57 this.chromePath,
57 this.safariPath, 58 this.safariPath,
58 this.firefoxPath, 59 this.firefoxPath,
59 this.dartPath, 60 this.dartPath,
60 this.dartPrecompiledPath, 61 this.dartPrecompiledPath,
61 this.flutterPath, 62 this.flutterPath,
62 this.taskCount, 63 this.taskCount,
63 int timeout, 64 int timeout,
64 this.shardCount, 65 this.shardCount,
65 this.shard, 66 this.shard,
66 this.stepName, 67 this.stepName,
67 this.testServerPort, 68 this.testServerPort,
68 this.testServerCrossOriginPort, 69 this.testServerCrossOriginPort,
69 this.testDriverErrorPort, 70 this.testDriverErrorPort,
70 this.localIP, 71 this.localIP,
71 this.dart2jsOptions, 72 this.dart2jsOptions,
72 this.vmOptions, 73 this.vmOptions,
73 String packages, 74 String packages,
74 this.packageRoot, 75 this.packageRoot,
75 this.suiteDirectory, 76 this.suiteDirectory,
76 this.builderTag, 77 this.builderTag,
78 this.outputDirectory,
77 this.reproducingArguments}) 79 this.reproducingArguments})
78 : _packages = packages, 80 : _packages = packages,
79 _timeout = timeout; 81 _timeout = timeout;
80 82
81 final Architecture architecture; 83 final Architecture architecture;
82 final Compiler compiler; 84 final Compiler compiler;
83 final Mode mode; 85 final Mode mode;
84 final Progress progress; 86 final Progress progress;
85 final Runtime runtime; 87 final Runtime runtime;
86 final System system; 88 final System system;
(...skipping 21 matching lines...) Expand all
108 final bool resetBrowser; 110 final bool resetBrowser;
109 final bool skipCompilation; 111 final bool skipCompilation;
110 final bool useBlobs; 112 final bool useBlobs;
111 final bool useSdk; 113 final bool useSdk;
112 final bool useFastStartup; 114 final bool useFastStartup;
113 final bool useEnableAsserts; 115 final bool useEnableAsserts;
114 final bool useDart2JSWithKernel; 116 final bool useDart2JSWithKernel;
115 final bool useDart2JSWithKernelInSsa; 117 final bool useDart2JSWithKernelInSsa;
116 final bool writeDebugLog; 118 final bool writeDebugLog;
117 final bool writeTestOutcomeLog; 119 final bool writeTestOutcomeLog;
120 final bool writeResultLog;
118 121
119 // Various file paths. 122 // Various file paths.
120 123
121 final String drtPath; 124 final String drtPath;
122 final String chromePath; 125 final String chromePath;
123 final String safariPath; 126 final String safariPath;
124 final String firefoxPath; 127 final String firefoxPath;
125 final String dartPath; 128 final String dartPath;
126 final String dartPrecompiledPath; 129 final String dartPrecompiledPath;
127 final String flutterPath; 130 final String flutterPath;
(...skipping 17 matching lines...) Expand all
145 String _packages; 148 String _packages;
146 String get packages { 149 String get packages {
147 // If the .packages file path wasn't given, find it. 150 // If the .packages file path wasn't given, find it.
148 if (packageRoot == null && _packages == null) { 151 if (packageRoot == null && _packages == null) {
149 _packages = TestUtils.dartDirUri.resolve('.packages').toFilePath(); 152 _packages = TestUtils.dartDirUri.resolve('.packages').toFilePath();
150 } 153 }
151 154
152 return _packages; 155 return _packages;
153 } 156 }
154 157
158 final String outputDirectory;
155 final String packageRoot; 159 final String packageRoot;
156 final String suiteDirectory; 160 final String suiteDirectory;
157 final String builderTag; 161 final String builderTag;
158 final List<String> reproducingArguments; 162 final List<String> reproducingArguments;
159 163
160 TestingServers _servers; 164 TestingServers _servers;
161 TestingServers get servers { 165 TestingServers get servers {
162 if (_servers == null) { 166 if (_servers == null) {
163 throw new StateError("Servers have not been started yet."); 167 throw new StateError("Servers have not been started yet.");
164 } 168 }
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 416
413 if (normalDir.existsSync() && crossDir.existsSync()) { 417 if (normalDir.existsSync() && crossDir.existsSync()) {
414 throw "You can't have both $normalDir and $crossDir. We don't know which" 418 throw "You can't have both $normalDir and $crossDir. We don't know which"
415 " binary to use."; 419 " binary to use.";
416 } 420 }
417 421
418 if (crossDir.existsSync()) return cross; 422 if (crossDir.existsSync()) return cross;
419 423
420 return normal; 424 return normal;
421 } 425 }
426
427 Map _summaryMap;
428
429 /// [toSummaryMap] returns a map of configurations important to the running
430 /// of a test. Flags and properties used for output are not included.
431 /// Boolean flags that are false are not included in the map. The summary map
432 /// can be used to serialize to json for test-output logging.
433 Map toSummaryMap() {
434 if (_summaryMap == null) {
435 _summaryMap = {
436 'mode': mode.name,
437 'arch': architecture.name,
438 'compiler': compiler.name,
439 'runtime': runtime.name,
440 'checked': isChecked,
441 'strong': isStrong,
442 'host_checked': isHostChecked,
443 'minified': isMinified,
444 'csp': isCsp,
445 'system': system.name,
446 'vm_options': vmOptions,
447 'use_sdk': useSdk,
448 'builder_tag': builderTag,
449 'fast_startup': useFastStartup,
450 'timeout': timeout
451 };
452 }
453 return _summaryMap;
454 }
422 } 455 }
423 456
424 class Architecture { 457 class Architecture {
425 static const ia32 = const Architecture._('ia32'); 458 static const ia32 = const Architecture._('ia32');
426 static const x64 = const Architecture._('x64'); 459 static const x64 = const Architecture._('x64');
427 static const arm = const Architecture._('arm'); 460 static const arm = const Architecture._('arm');
428 static const armv6 = const Architecture._('armv6'); 461 static const armv6 = const Architecture._('armv6');
429 static const armv5te = const Architecture._('armv5te'); 462 static const armv5te = const Architecture._('armv5te');
430 static const arm64 = const Architecture._('arm64'); 463 static const arm64 = const Architecture._('arm64');
431 static const simarm = const Architecture._('simarm'); 464 static const simarm = const Architecture._('simarm');
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 765
733 case macos: 766 case macos:
734 return 'xcodebuild/'; 767 return 'xcodebuild/';
735 } 768 }
736 769
737 throw "unreachable"; 770 throw "unreachable";
738 } 771 }
739 772
740 String toString() => "System($name)"; 773 String toString() => "System($name)";
741 } 774 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698