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

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

Issue 2099553002: Add an option to run skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 5 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.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool get jsTrace => _jsTrace ?? false; 47 bool get jsTrace => _jsTrace ?? false;
48 final bool _jsTrace; 48 final bool _jsTrace;
49 49
50 /// Whether tests should be skipped. 50 /// Whether tests should be skipped.
51 bool get skip => _skip ?? false; 51 bool get skip => _skip ?? false;
52 final bool _skip; 52 final bool _skip;
53 53
54 /// The reason tests or suites should be skipped, if given. 54 /// The reason tests or suites should be skipped, if given.
55 final String skipReason; 55 final String skipReason;
56 56
57 /// Whether skipped tests should be run.
58 bool get runSkipped => _runSkipped ?? false;
59 final bool _runSkipped;
60
57 /// The selector indicating which platforms the tests support. 61 /// The selector indicating which platforms the tests support.
58 /// 62 ///
59 /// When [merge]d, this is intersected with the other configuration's 63 /// When [merge]d, this is intersected with the other configuration's
60 /// supported platforms. 64 /// supported platforms.
61 final PlatformSelector testOn; 65 final PlatformSelector testOn;
62 66
63 /// Whether to pause for debugging after loading each test suite. 67 /// Whether to pause for debugging after loading each test suite.
64 bool get pauseAfterLoad => _pauseAfterLoad ?? false; 68 bool get pauseAfterLoad => _pauseAfterLoad ?? false;
65 final bool _pauseAfterLoad; 69 final bool _pauseAfterLoad;
66 70
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 factory Configuration.load(String path, {bool global: false}) => 272 factory Configuration.load(String path, {bool global: false}) =>
269 load(path, global: global); 273 load(path, global: global);
270 274
271 factory Configuration({ 275 factory Configuration({
272 bool help, 276 bool help,
273 bool version, 277 bool version,
274 bool verboseTrace, 278 bool verboseTrace,
275 bool jsTrace, 279 bool jsTrace,
276 bool skip, 280 bool skip,
277 String skipReason, 281 String skipReason,
282 bool runSkipped,
278 PlatformSelector testOn, 283 PlatformSelector testOn,
279 bool pauseAfterLoad, 284 bool pauseAfterLoad,
280 bool color, 285 bool color,
281 String packageRoot, 286 String packageRoot,
282 String dart2jsPath, 287 String dart2jsPath,
283 Iterable<String> dart2jsArgs, 288 Iterable<String> dart2jsArgs,
284 String precompiledPath, 289 String precompiledPath,
285 String reporter, 290 String reporter,
286 int pubServePort, 291 int pubServePort,
287 int concurrency, 292 int concurrency,
(...skipping 11 matching lines...) Expand all
299 Map<BooleanSelector, Configuration> tags, 304 Map<BooleanSelector, Configuration> tags,
300 Map<PlatformSelector, Configuration> onPlatform, 305 Map<PlatformSelector, Configuration> onPlatform,
301 Map<String, Configuration> presets}) { 306 Map<String, Configuration> presets}) {
302 _unresolved() => new Configuration._( 307 _unresolved() => new Configuration._(
303 help: help, 308 help: help,
304 version: version, 309 version: version,
305 verboseTrace: verboseTrace, 310 verboseTrace: verboseTrace,
306 jsTrace: jsTrace, 311 jsTrace: jsTrace,
307 skip: skip, 312 skip: skip,
308 skipReason: skipReason, 313 skipReason: skipReason,
314 runSkipped: runSkipped,
309 testOn: testOn, 315 testOn: testOn,
310 pauseAfterLoad: pauseAfterLoad, 316 pauseAfterLoad: pauseAfterLoad,
311 color: color, 317 color: color,
312 packageRoot: packageRoot, 318 packageRoot: packageRoot,
313 dart2jsPath: dart2jsPath, 319 dart2jsPath: dart2jsPath,
314 dart2jsArgs: dart2jsArgs, 320 dart2jsArgs: dart2jsArgs,
315 precompiledPath: precompiledPath, 321 precompiledPath: precompiledPath,
316 reporter: reporter, 322 reporter: reporter,
317 pubServePort: pubServePort, 323 pubServePort: pubServePort,
318 concurrency: concurrency, 324 concurrency: concurrency,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 /// Creates new Configuration. 375 /// Creates new Configuration.
370 /// 376 ///
371 /// Unlike [new Configuration], this assumes [presets] is already resolved. 377 /// Unlike [new Configuration], this assumes [presets] is already resolved.
372 Configuration._({ 378 Configuration._({
373 bool help, 379 bool help,
374 bool version, 380 bool version,
375 bool verboseTrace, 381 bool verboseTrace,
376 bool jsTrace, 382 bool jsTrace,
377 bool skip, 383 bool skip,
378 this.skipReason, 384 this.skipReason,
385 bool runSkipped,
379 PlatformSelector testOn, 386 PlatformSelector testOn,
380 bool pauseAfterLoad, 387 bool pauseAfterLoad,
381 bool color, 388 bool color,
382 String packageRoot, 389 String packageRoot,
383 String dart2jsPath, 390 String dart2jsPath,
384 Iterable<String> dart2jsArgs, 391 Iterable<String> dart2jsArgs,
385 this.precompiledPath, 392 this.precompiledPath,
386 String reporter, 393 String reporter,
387 int pubServePort, 394 int pubServePort,
388 int concurrency, 395 int concurrency,
389 this.shardIndex, 396 this.shardIndex,
390 this.totalShards, 397 this.totalShards,
391 Timeout timeout, 398 Timeout timeout,
392 Iterable<Pattern> patterns, 399 Iterable<Pattern> patterns,
393 Iterable<TestPlatform> platforms, 400 Iterable<TestPlatform> platforms,
394 Iterable<String> paths, 401 Iterable<String> paths,
395 Glob filename, 402 Glob filename,
396 Iterable<String> chosenPresets, 403 Iterable<String> chosenPresets,
397 BooleanSelector includeTags, 404 BooleanSelector includeTags,
398 BooleanSelector excludeTags, 405 BooleanSelector excludeTags,
399 Iterable<String> addTags, 406 Iterable<String> addTags,
400 Map<BooleanSelector, Configuration> tags, 407 Map<BooleanSelector, Configuration> tags,
401 Map<PlatformSelector, Configuration> onPlatform, 408 Map<PlatformSelector, Configuration> onPlatform,
402 Map<String, Configuration> presets}) 409 Map<String, Configuration> presets})
403 : _help = help, 410 : _help = help,
404 _version = version, 411 _version = version,
405 _verboseTrace = verboseTrace, 412 _verboseTrace = verboseTrace,
406 _jsTrace = jsTrace, 413 _jsTrace = jsTrace,
407 _skip = skip, 414 _skip = skip,
415 _runSkipped = runSkipped,
408 testOn = testOn ?? PlatformSelector.all, 416 testOn = testOn ?? PlatformSelector.all,
409 _pauseAfterLoad = pauseAfterLoad, 417 _pauseAfterLoad = pauseAfterLoad,
410 _color = color, 418 _color = color,
411 _packageRoot = packageRoot, 419 _packageRoot = packageRoot,
412 _dart2jsPath = dart2jsPath, 420 _dart2jsPath = dart2jsPath,
413 dart2jsArgs = dart2jsArgs?.toList() ?? [], 421 dart2jsArgs = dart2jsArgs?.toList() ?? [],
414 _reporter = reporter, 422 _reporter = reporter,
415 pubServeUrl = pubServePort == null 423 pubServeUrl = pubServePort == null
416 ? null 424 ? null
417 : Uri.parse("http://localhost:$pubServePort"), 425 : Uri.parse("http://localhost:$pubServePort"),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if (this == Configuration.empty) return other; 480 if (this == Configuration.empty) return other;
473 if (other == Configuration.empty) return this; 481 if (other == Configuration.empty) return this;
474 482
475 var result = new Configuration( 483 var result = new Configuration(
476 help: other._help ?? _help, 484 help: other._help ?? _help,
477 version: other._version ?? _version, 485 version: other._version ?? _version,
478 verboseTrace: other._verboseTrace ?? _verboseTrace, 486 verboseTrace: other._verboseTrace ?? _verboseTrace,
479 jsTrace: other._jsTrace ?? _jsTrace, 487 jsTrace: other._jsTrace ?? _jsTrace,
480 skip: other._skip ?? _skip, 488 skip: other._skip ?? _skip,
481 skipReason: other.skipReason ?? skipReason, 489 skipReason: other.skipReason ?? skipReason,
490 runSkipped: other._runSkipped ?? _runSkipped,
482 testOn: testOn.intersection(other.testOn), 491 testOn: testOn.intersection(other.testOn),
483 pauseAfterLoad: other._pauseAfterLoad ?? _pauseAfterLoad, 492 pauseAfterLoad: other._pauseAfterLoad ?? _pauseAfterLoad,
484 color: other._color ?? _color, 493 color: other._color ?? _color,
485 packageRoot: other._packageRoot ?? _packageRoot, 494 packageRoot: other._packageRoot ?? _packageRoot,
486 dart2jsPath: other._dart2jsPath ?? _dart2jsPath, 495 dart2jsPath: other._dart2jsPath ?? _dart2jsPath,
487 dart2jsArgs: dart2jsArgs.toList()..addAll(other.dart2jsArgs), 496 dart2jsArgs: dart2jsArgs.toList()..addAll(other.dart2jsArgs),
488 precompiledPath: other.precompiledPath ?? precompiledPath, 497 precompiledPath: other.precompiledPath ?? precompiledPath,
489 reporter: other._reporter ?? _reporter, 498 reporter: other._reporter ?? _reporter,
490 pubServePort: (other.pubServeUrl ?? pubServeUrl)?.port, 499 pubServePort: (other.pubServeUrl ?? pubServeUrl)?.port,
491 concurrency: other._concurrency ?? _concurrency, 500 concurrency: other._concurrency ?? _concurrency,
(...skipping 22 matching lines...) Expand all
514 /// 523 ///
515 /// Note that unlike [merge], this has no merging behavior—the old value is 524 /// Note that unlike [merge], this has no merging behavior—the old value is
516 /// always replaced by the new one. 525 /// always replaced by the new one.
517 Configuration change({ 526 Configuration change({
518 bool help, 527 bool help,
519 bool version, 528 bool version,
520 bool verboseTrace, 529 bool verboseTrace,
521 bool jsTrace, 530 bool jsTrace,
522 bool skip, 531 bool skip,
523 String skipReason, 532 String skipReason,
533 bool runSkipped,
524 PlatformSelector testOn, 534 PlatformSelector testOn,
525 bool pauseAfterLoad, 535 bool pauseAfterLoad,
526 bool color, 536 bool color,
527 String packageRoot, 537 String packageRoot,
528 String dart2jsPath, 538 String dart2jsPath,
529 Iterable<String> dart2jsArgs, 539 Iterable<String> dart2jsArgs,
530 String precompiledPath, 540 String precompiledPath,
531 String reporter, 541 String reporter,
532 int pubServePort, 542 int pubServePort,
533 int concurrency, 543 int concurrency,
(...skipping 11 matching lines...) Expand all
545 Map<BooleanSelector, Configuration> tags, 555 Map<BooleanSelector, Configuration> tags,
546 Map<PlatformSelector, Configuration> onPlatform, 556 Map<PlatformSelector, Configuration> onPlatform,
547 Map<String, Configuration> presets}) { 557 Map<String, Configuration> presets}) {
548 return new Configuration( 558 return new Configuration(
549 help: help ?? _help, 559 help: help ?? _help,
550 version: version ?? _version, 560 version: version ?? _version,
551 verboseTrace: verboseTrace ?? _verboseTrace, 561 verboseTrace: verboseTrace ?? _verboseTrace,
552 jsTrace: jsTrace ?? _jsTrace, 562 jsTrace: jsTrace ?? _jsTrace,
553 skip: skip ?? _skip, 563 skip: skip ?? _skip,
554 skipReason: skipReason ?? this.skipReason, 564 skipReason: skipReason ?? this.skipReason,
565 runSkipped: runSkipped ?? _runSkipped,
555 testOn: testOn ?? this.testOn, 566 testOn: testOn ?? this.testOn,
556 pauseAfterLoad: pauseAfterLoad ?? _pauseAfterLoad, 567 pauseAfterLoad: pauseAfterLoad ?? _pauseAfterLoad,
557 color: color ?? _color, 568 color: color ?? _color,
558 packageRoot: packageRoot ?? _packageRoot, 569 packageRoot: packageRoot ?? _packageRoot,
559 dart2jsPath: dart2jsPath ?? _dart2jsPath, 570 dart2jsPath: dart2jsPath ?? _dart2jsPath,
560 dart2jsArgs: dart2jsArgs?.toList() ?? this.dart2jsArgs, 571 dart2jsArgs: dart2jsArgs?.toList() ?? this.dart2jsArgs,
561 precompiledPath: precompiledPath ?? this.precompiledPath, 572 precompiledPath: precompiledPath ?? this.precompiledPath,
562 reporter: reporter ?? _reporter, 573 reporter: reporter ?? _reporter,
563 pubServePort: pubServePort ?? pubServeUrl?.port, 574 pubServePort: pubServePort ?? pubServeUrl?.port,
564 concurrency: concurrency ?? _concurrency, 575 concurrency: concurrency ?? _concurrency,
(...skipping 15 matching lines...) Expand all
580 591
581 /// Merges two maps whose values are [Configuration]s. 592 /// Merges two maps whose values are [Configuration]s.
582 /// 593 ///
583 /// Any overlapping keys in the maps have their configurations merged in the 594 /// Any overlapping keys in the maps have their configurations merged in the
584 /// returned map. 595 /// returned map.
585 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1, 596 Map<Object, Configuration> _mergeConfigMaps(Map<Object, Configuration> map1,
586 Map<Object, Configuration> map2) => 597 Map<Object, Configuration> map2) =>
587 mergeMaps(map1, map2, 598 mergeMaps(map1, map2,
588 value: (config1, config2) => config1.merge(config2)); 599 value: (config1, config2) => config1.merge(config2));
589 } 600 }
OLDNEW
« no previous file with comments | « lib/src/runner.dart ('k') | lib/src/runner/configuration/args.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698