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

Side by Side Diff: tools/testing/dart/options.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 | « tools/testing/dart/configuration.dart ('k') | tools/testing/dart/test_configurations.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:io'; 5 import 'dart:io';
6 6
7 import 'configuration.dart'; 7 import 'configuration.dart';
8 import 'path.dart'; 8 import 'path.dart';
9 import 'runtime_updater.dart'; 9 import 'runtime_updater.dart';
10 import 'utils.dart'; 10 import 'utils.dart';
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 new _Option.bool('use_sdk', '''Use compiler or runtime from the SDK. 226 new _Option.bool('use_sdk', '''Use compiler or runtime from the SDK.
227 227
228 Normally, the compiler or runtimes in PRODUCT_DIR is tested, with 228 Normally, the compiler or runtimes in PRODUCT_DIR is tested, with
229 this option, the compiler or runtime in PRODUCT_DIR/dart-sdk/bin 229 this option, the compiler or runtime in PRODUCT_DIR/dart-sdk/bin
230 is tested. 230 is tested.
231 231
232 (Note: currently only implemented for dart2js.)'''), 232 (Note: currently only implemented for dart2js.)'''),
233 // TODO(rnystrom): This does not appear to be used. Remove? 233 // TODO(rnystrom): This does not appear to be used. Remove?
234 new _Option('build_directory', 234 new _Option('build_directory',
235 'The name of the build directory, where products are placed.'), 235 'The name of the build directory, where products are placed.'),
236 new _Option('output_directory',
237 'The name of the output directory for storing log files.',
238 defaultsTo: "logs"),
236 new _Option.bool('noBatch', 'Do not run tests in batch mode.', 'n'), 239 new _Option.bool('noBatch', 'Do not run tests in batch mode.', 'n'),
237 new _Option.bool('dart2js_batch', 'Run dart2js tests in batch mode.'), 240 new _Option.bool('dart2js_batch', 'Run dart2js tests in batch mode.'),
238 new _Option.bool( 241 new _Option.bool(
239 'append_logs', 'Do not delete old logs but rather append to them.'), 242 'append_logs', 'Do not delete old logs but rather append to them.'),
240 new _Option.bool('write_debug_log', 243 new _Option.bool('write_debug_log',
241 'Don\'t write debug messages to stdout but rather to a logfile.'), 244 'Don\'t write debug messages to stdout but rather to a logfile.'),
242 new _Option.bool('write_test_outcome_log', 245 new _Option.bool('write_test_outcome_log',
243 'Write test outcomes to a "${TestUtils.testOutcomeFileName}" file.'), 246 'Write test outcomes to a "${TestUtils.testOutcomeFileName}" file.'),
247 new _Option.bool(
248 'write_result_log',
249 'Write test results to a "${TestUtils.resultLogFileName}" json file '
250 'located at the debug_output_directory.'),
244 new _Option.bool('reset_browser_configuration', 251 new _Option.bool('reset_browser_configuration',
245 '''Browser specific reset of configuration. 252 '''Browser specific reset of configuration.
246 253
247 Warning: Using this option may remove your bookmarks and other 254 Warning: Using this option may remove your bookmarks and other
248 settings.'''), 255 settings.'''),
249 new _Option.bool('copy_coredumps', 256 new _Option.bool('copy_coredumps',
250 '''If we see a crash that we did not expect, copy the core dumps to 257 '''If we see a crash that we did not expect, copy the core dumps to
251 "/tmp".'''), 258 "/tmp".'''),
252 new _Option( 259 new _Option(
253 'local_ip', 260 'local_ip',
(...skipping 29 matching lines...) Expand all
283 false positves and negatives, but can be useful for quick and 290 false positves and negatives, but can be useful for quick and
284 dirty offline testing when not making changes that affect the 291 dirty offline testing when not making changes that affect the
285 compiler.''') 292 compiler.''')
286 ]; 293 ];
287 294
288 /// For printing out reproducing command lines, we don't want to add these 295 /// For printing out reproducing command lines, we don't want to add these
289 /// options. 296 /// options.
290 static final _blacklistedOptions = [ 297 static final _blacklistedOptions = [
291 'append_logs', 298 'append_logs',
292 'build_directory', 299 'build_directory',
300 'debug_output_directory',
293 'chrome', 301 'chrome',
294 'copy_coredumps', 302 'copy_coredumps',
295 'dart', 303 'dart',
296 'flutter', 304 'flutter',
297 'drt', 305 'drt',
298 'exclude_suite', 306 'exclude_suite',
299 'firefox', 307 'firefox',
300 'local_ip', 308 'local_ip',
301 'progress', 309 'progress',
302 'report', 310 'report',
303 'safari', 311 'safari',
304 'shard', 312 'shard',
305 'shards', 313 'shards',
306 'step_name', 314 'step_name',
307 'tasks', 315 'tasks',
308 'time', 316 'time',
309 'verbose', 317 'verbose',
310 'write_debug_log', 318 'write_debug_log',
311 'write_test_outcome_log', 319 'write_test_outcome_log',
320 'write_result_json_log'
312 ].toSet(); 321 ].toSet();
313 322
314 /// Parses a list of strings as test options. 323 /// Parses a list of strings as test options.
315 /// 324 ///
316 /// Returns a list of configurations in which to run the tests. 325 /// Returns a list of configurations in which to run the tests.
317 /// Configurations are maps mapping from option keys to values. When 326 /// Configurations are maps mapping from option keys to values. When
318 /// encountering the first non-option string, the rest of the arguments are 327 /// encountering the first non-option string, the rest of the arguments are
319 /// stored in the returned Map under the 'rest' key. 328 /// stored in the returned Map under the 'rest' key.
320 List<Configuration> parse(List<String> arguments) { 329 List<Configuration> parse(List<String> arguments) {
321 var configuration = <String, dynamic>{}; 330 var configuration = <String, dynamic>{};
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 skipCompilation: data["skip_compilation"] as bool, 602 skipCompilation: data["skip_compilation"] as bool,
594 useBlobs: data["use_blobs"] as bool, 603 useBlobs: data["use_blobs"] as bool,
595 useSdk: data["use_sdk"] as bool, 604 useSdk: data["use_sdk"] as bool,
596 useFastStartup: data["fast_startup"] as bool, 605 useFastStartup: data["fast_startup"] as bool,
597 useEnableAsserts: data["enable_asserts"] as bool, 606 useEnableAsserts: data["enable_asserts"] as bool,
598 useDart2JSWithKernel: data["dart2js_with_kernel"] as bool, 607 useDart2JSWithKernel: data["dart2js_with_kernel"] as bool,
599 useDart2JSWithKernelInSsa: 608 useDart2JSWithKernelInSsa:
600 data["dart2js_with_kernel_in_ssa"] as bool, 609 data["dart2js_with_kernel_in_ssa"] as bool,
601 writeDebugLog: data["write_debug_log"] as bool, 610 writeDebugLog: data["write_debug_log"] as bool,
602 writeTestOutcomeLog: data["write_test_outcome_log"] as bool, 611 writeTestOutcomeLog: data["write_test_outcome_log"] as bool,
612 writeResultLog: data["write_result_log"] as bool,
603 drtPath: data["drt"] as String, 613 drtPath: data["drt"] as String,
604 chromePath: data["chrome"] as String, 614 chromePath: data["chrome"] as String,
605 safariPath: data["safari"] as String, 615 safariPath: data["safari"] as String,
606 firefoxPath: data["firefox"] as String, 616 firefoxPath: data["firefox"] as String,
607 dartPath: data["dart"] as String, 617 dartPath: data["dart"] as String,
608 dartPrecompiledPath: data["dart_precompiled"] as String, 618 dartPrecompiledPath: data["dart_precompiled"] as String,
609 flutterPath: data["flutter"] as String, 619 flutterPath: data["flutter"] as String,
610 taskCount: data["tasks"] as int, 620 taskCount: data["tasks"] as int,
611 timeout: data["timeout"] as int, 621 timeout: data["timeout"] as int,
612 shardCount: data["shards"] as int, 622 shardCount: data["shards"] as int,
613 shard: data["shard"] as int, 623 shard: data["shard"] as int,
614 stepName: data["step_name"] as String, 624 stepName: data["step_name"] as String,
615 testServerPort: data["test_server_port"] as int, 625 testServerPort: data["test_server_port"] as int,
616 testServerCrossOriginPort: 626 testServerCrossOriginPort:
617 data['test_server_cross_origin_port'] as int, 627 data['test_server_cross_origin_port'] as int,
618 testDriverErrorPort: data["test_driver_error_port"] as int, 628 testDriverErrorPort: data["test_driver_error_port"] as int,
619 localIP: data["local_ip"] as String, 629 localIP: data["local_ip"] as String,
620 dart2jsOptions: dart2jsOptions, 630 dart2jsOptions: dart2jsOptions,
621 vmOptions: vmOptions, 631 vmOptions: vmOptions,
622 packages: data["packages"] as String, 632 packages: data["packages"] as String,
623 packageRoot: data["package_root"] as String, 633 packageRoot: data["package_root"] as String,
624 suiteDirectory: data["suite_dir"] as String, 634 suiteDirectory: data["suite_dir"] as String,
625 builderTag: data["builder_tag"] as String, 635 builderTag: data["builder_tag"] as String,
636 outputDirectory: data["output_directory"] as String,
626 reproducingArguments: _reproducingCommand(data)); 637 reproducingArguments: _reproducingCommand(data));
627 638
628 if (configuration.validate()) { 639 if (configuration.validate()) {
629 result.add(configuration); 640 result.add(configuration);
630 } 641 }
631 } 642 }
632 } 643 }
633 } 644 }
634 } 645 }
635 646
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 if (name == option.name) return option; 767 if (name == option.name) return option;
757 768
758 // Allow hyphens instead of underscores as the separator since they are 769 // Allow hyphens instead of underscores as the separator since they are
759 // more common for command line flags. 770 // more common for command line flags.
760 if (name == option.name.replaceAll("_", "-")) return option; 771 if (name == option.name.replaceAll("_", "-")) return option;
761 } 772 }
762 773
763 return null; 774 return null;
764 } 775 }
765 } 776 }
OLDNEW
« no previous file with comments | « tools/testing/dart/configuration.dart ('k') | tools/testing/dart/test_configurations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698