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

Side by Side Diff: lib/src/runner/configuration.dart

Issue 2040883003: Add support for passing in precompiled JS. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 6 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 | « lib/src/runner/browser/platform.dart ('k') | lib/src/runner/configuration/args.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 'package:boolean_selector/boolean_selector.dart'; 7 import 'package:boolean_selector/boolean_selector.dart';
8 import 'package:collection/collection.dart'; 8 import 'package:collection/collection.dart';
9 import 'package:glob/glob.dart'; 9 import 'package:glob/glob.dart';
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 String get packageRoot => _packageRoot ?? p.join(p.current, 'packages'); 68 String get packageRoot => _packageRoot ?? p.join(p.current, 'packages');
69 final String _packageRoot; 69 final String _packageRoot;
70 70
71 /// The path to dart2js. 71 /// The path to dart2js.
72 String get dart2jsPath => _dart2jsPath ?? p.join(sdkDir, 'bin', 'dart2js'); 72 String get dart2jsPath => _dart2jsPath ?? p.join(sdkDir, 'bin', 'dart2js');
73 final String _dart2jsPath; 73 final String _dart2jsPath;
74 74
75 /// Additional arguments to pass to dart2js. 75 /// Additional arguments to pass to dart2js.
76 final List<String> dart2jsArgs; 76 final List<String> dart2jsArgs;
77 77
78 /// The path to a mirror of this package containing precompiled JS.
79 ///
80 /// This is used by the internal Google test runner so that test compilation
81 /// can more effectively make use of Google's build tools.
82 final String precompiledPath;
83
78 /// The name of the reporter to use to display results. 84 /// The name of the reporter to use to display results.
79 String get reporter => _reporter ?? defaultReporter; 85 String get reporter => _reporter ?? defaultReporter;
80 final String _reporter; 86 final String _reporter;
81 87
82 /// The URL for the `pub serve` instance from which to load tests, or `null` 88 /// The URL for the `pub serve` instance from which to load tests, or `null`
83 /// if tests should be loaded from the filesystem. 89 /// if tests should be loaded from the filesystem.
84 final Uri pubServeUrl; 90 final Uri pubServeUrl;
85 91
86 /// The default test timeout. 92 /// The default test timeout.
87 /// 93 ///
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 bool verboseTrace, 274 bool verboseTrace,
269 bool jsTrace, 275 bool jsTrace,
270 bool skip, 276 bool skip,
271 String skipReason, 277 String skipReason,
272 PlatformSelector testOn, 278 PlatformSelector testOn,
273 bool pauseAfterLoad, 279 bool pauseAfterLoad,
274 bool color, 280 bool color,
275 String packageRoot, 281 String packageRoot,
276 String dart2jsPath, 282 String dart2jsPath,
277 Iterable<String> dart2jsArgs, 283 Iterable<String> dart2jsArgs,
284 String precompiledPath,
278 String reporter, 285 String reporter,
279 int pubServePort, 286 int pubServePort,
280 int concurrency, 287 int concurrency,
281 int shardIndex, 288 int shardIndex,
282 int totalShards, 289 int totalShards,
283 Timeout timeout, 290 Timeout timeout,
284 Iterable<Pattern> patterns, 291 Iterable<Pattern> patterns,
285 Iterable<TestPlatform> platforms, 292 Iterable<TestPlatform> platforms,
286 Iterable<String> paths, 293 Iterable<String> paths,
287 Glob filename, 294 Glob filename,
(...skipping 10 matching lines...) Expand all
298 verboseTrace: verboseTrace, 305 verboseTrace: verboseTrace,
299 jsTrace: jsTrace, 306 jsTrace: jsTrace,
300 skip: skip, 307 skip: skip,
301 skipReason: skipReason, 308 skipReason: skipReason,
302 testOn: testOn, 309 testOn: testOn,
303 pauseAfterLoad: pauseAfterLoad, 310 pauseAfterLoad: pauseAfterLoad,
304 color: color, 311 color: color,
305 packageRoot: packageRoot, 312 packageRoot: packageRoot,
306 dart2jsPath: dart2jsPath, 313 dart2jsPath: dart2jsPath,
307 dart2jsArgs: dart2jsArgs, 314 dart2jsArgs: dart2jsArgs,
315 precompiledPath: precompiledPath,
308 reporter: reporter, 316 reporter: reporter,
309 pubServePort: pubServePort, 317 pubServePort: pubServePort,
310 concurrency: concurrency, 318 concurrency: concurrency,
311 shardIndex: shardIndex, 319 shardIndex: shardIndex,
312 totalShards: totalShards, 320 totalShards: totalShards,
313 timeout: timeout, 321 timeout: timeout,
314 patterns: patterns, 322 patterns: patterns,
315 platforms: platforms, 323 platforms: platforms,
316 paths: paths, 324 paths: paths,
317 filename: filename, 325 filename: filename,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 bool verboseTrace, 375 bool verboseTrace,
368 bool jsTrace, 376 bool jsTrace,
369 bool skip, 377 bool skip,
370 this.skipReason, 378 this.skipReason,
371 PlatformSelector testOn, 379 PlatformSelector testOn,
372 bool pauseAfterLoad, 380 bool pauseAfterLoad,
373 bool color, 381 bool color,
374 String packageRoot, 382 String packageRoot,
375 String dart2jsPath, 383 String dart2jsPath,
376 Iterable<String> dart2jsArgs, 384 Iterable<String> dart2jsArgs,
385 this.precompiledPath,
377 String reporter, 386 String reporter,
378 int pubServePort, 387 int pubServePort,
379 int concurrency, 388 int concurrency,
380 this.shardIndex, 389 this.shardIndex,
381 this.totalShards, 390 this.totalShards,
382 Timeout timeout, 391 Timeout timeout,
383 Iterable<Pattern> patterns, 392 Iterable<Pattern> patterns,
384 Iterable<TestPlatform> platforms, 393 Iterable<TestPlatform> platforms,
385 Iterable<String> paths, 394 Iterable<String> paths,
386 Glob filename, 395 Glob filename,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 verboseTrace: other._verboseTrace ?? _verboseTrace, 478 verboseTrace: other._verboseTrace ?? _verboseTrace,
470 jsTrace: other._jsTrace ?? _jsTrace, 479 jsTrace: other._jsTrace ?? _jsTrace,
471 skip: other._skip ?? _skip, 480 skip: other._skip ?? _skip,
472 skipReason: other.skipReason ?? skipReason, 481 skipReason: other.skipReason ?? skipReason,
473 testOn: testOn.intersection(other.testOn), 482 testOn: testOn.intersection(other.testOn),
474 pauseAfterLoad: other._pauseAfterLoad ?? _pauseAfterLoad, 483 pauseAfterLoad: other._pauseAfterLoad ?? _pauseAfterLoad,
475 color: other._color ?? _color, 484 color: other._color ?? _color,
476 packageRoot: other._packageRoot ?? _packageRoot, 485 packageRoot: other._packageRoot ?? _packageRoot,
477 dart2jsPath: other._dart2jsPath ?? _dart2jsPath, 486 dart2jsPath: other._dart2jsPath ?? _dart2jsPath,
478 dart2jsArgs: dart2jsArgs.toList()..addAll(other.dart2jsArgs), 487 dart2jsArgs: dart2jsArgs.toList()..addAll(other.dart2jsArgs),
488 precompiledPath: other.precompiledPath ?? precompiledPath,
479 reporter: other._reporter ?? _reporter, 489 reporter: other._reporter ?? _reporter,
480 pubServePort: (other.pubServeUrl ?? pubServeUrl)?.port, 490 pubServePort: (other.pubServeUrl ?? pubServeUrl)?.port,
481 concurrency: other._concurrency ?? _concurrency, 491 concurrency: other._concurrency ?? _concurrency,
482 shardIndex: other.shardIndex ?? shardIndex, 492 shardIndex: other.shardIndex ?? shardIndex,
483 totalShards: other.totalShards ?? totalShards, 493 totalShards: other.totalShards ?? totalShards,
484 timeout: timeout.merge(other.timeout), 494 timeout: timeout.merge(other.timeout),
485 patterns: patterns.union(other.patterns), 495 patterns: patterns.union(other.patterns),
486 platforms: other._platforms ?? _platforms, 496 platforms: other._platforms ?? _platforms,
487 paths: other._paths ?? _paths, 497 paths: other._paths ?? _paths,
488 filename: other._filename ?? _filename, 498 filename: other._filename ?? _filename,
(...skipping 21 matching lines...) Expand all
510 bool verboseTrace, 520 bool verboseTrace,
511 bool jsTrace, 521 bool jsTrace,
512 bool skip, 522 bool skip,
513 String skipReason, 523 String skipReason,
514 PlatformSelector testOn, 524 PlatformSelector testOn,
515 bool pauseAfterLoad, 525 bool pauseAfterLoad,
516 bool color, 526 bool color,
517 String packageRoot, 527 String packageRoot,
518 String dart2jsPath, 528 String dart2jsPath,
519 Iterable<String> dart2jsArgs, 529 Iterable<String> dart2jsArgs,
530 String precompiledPath,
520 String reporter, 531 String reporter,
521 int pubServePort, 532 int pubServePort,
522 int concurrency, 533 int concurrency,
523 int shardIndex, 534 int shardIndex,
524 int totalShards, 535 int totalShards,
525 Timeout timeout, 536 Timeout timeout,
526 Iterable<Pattern> patterns, 537 Iterable<Pattern> patterns,
527 Iterable<TestPlatform> platforms, 538 Iterable<TestPlatform> platforms,
528 Iterable<String> paths, 539 Iterable<String> paths,
529 Glob filename, 540 Glob filename,
(...skipping 10 matching lines...) Expand all
540 verboseTrace: verboseTrace ?? _verboseTrace, 551 verboseTrace: verboseTrace ?? _verboseTrace,
541 jsTrace: jsTrace ?? _jsTrace, 552 jsTrace: jsTrace ?? _jsTrace,
542 skip: skip ?? _skip, 553 skip: skip ?? _skip,
543 skipReason: skipReason ?? this.skipReason, 554 skipReason: skipReason ?? this.skipReason,
544 testOn: testOn ?? this.testOn, 555 testOn: testOn ?? this.testOn,
545 pauseAfterLoad: pauseAfterLoad ?? _pauseAfterLoad, 556 pauseAfterLoad: pauseAfterLoad ?? _pauseAfterLoad,
546 color: color ?? _color, 557 color: color ?? _color,
547 packageRoot: packageRoot ?? _packageRoot, 558 packageRoot: packageRoot ?? _packageRoot,
548 dart2jsPath: dart2jsPath ?? _dart2jsPath, 559 dart2jsPath: dart2jsPath ?? _dart2jsPath,
549 dart2jsArgs: dart2jsArgs?.toList() ?? this.dart2jsArgs, 560 dart2jsArgs: dart2jsArgs?.toList() ?? this.dart2jsArgs,
561 precompiledPath: precompiledPath ?? this.precompiledPath,
550 reporter: reporter ?? _reporter, 562 reporter: reporter ?? _reporter,
551 pubServePort: pubServePort ?? pubServeUrl?.port, 563 pubServePort: pubServePort ?? pubServeUrl?.port,
552 concurrency: concurrency ?? _concurrency, 564 concurrency: concurrency ?? _concurrency,
553 shardIndex: shardIndex ?? this.shardIndex, 565 shardIndex: shardIndex ?? this.shardIndex,
554 totalShards: totalShards ?? this.totalShards, 566 totalShards: totalShards ?? this.totalShards,
555 timeout: timeout ?? this.timeout, 567 timeout: timeout ?? this.timeout,
556 patterns: patterns ?? this.patterns, 568 patterns: patterns ?? this.patterns,
557 platforms: platforms ?? _platforms, 569 platforms: platforms ?? _platforms,
558 paths: paths ?? _paths, 570 paths: paths ?? _paths,
559 filename: filename ?? _filename, 571 filename: filename ?? _filename,
560 chosenPresets: chosenPresets ?? this.chosenPresets, 572 chosenPresets: chosenPresets ?? this.chosenPresets,
561 includeTags: includeTags ?? this.includeTags, 573 includeTags: includeTags ?? this.includeTags,
562 excludeTags: excludeTags ?? this.excludeTags, 574 excludeTags: excludeTags ?? this.excludeTags,
563 addTags: addTags ?? this.addTags, 575 addTags: addTags ?? this.addTags,
564 tags: tags ?? this.tags, 576 tags: tags ?? this.tags,
565 onPlatform: onPlatform ?? this.onPlatform, 577 onPlatform: onPlatform ?? this.onPlatform,
566 presets: presets ?? this.presets); 578 presets: presets ?? this.presets);
567 } 579 }
568 580
569 /// Merges two maps whose values are [Configuration]s. 581 /// Merges two maps whose values are [Configuration]s.
570 /// 582 ///
571 /// Any overlapping keys in the maps have their configurations merged in the 583 /// Any overlapping keys in the maps have their configurations merged in the
572 /// returned map. 584 /// returned map.
573 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1, 585 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1,
574 Map<Object, Configuration> map2) => 586 Map<Object, Configuration> map2) =>
575 mergeMaps(map1, map2, 587 mergeMaps(map1, map2,
576 value: (config1, config2) => config1.merge(config2)); 588 value: (config1, config2) => config1.merge(config2));
577 } 589 }
OLDNEW
« no previous file with comments | « lib/src/runner/browser/platform.dart ('k') | lib/src/runner/configuration/args.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698