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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 13839023: Add flag to disable capturing stack traces. (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
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 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub 5 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub
6 /// tests are integration tests that stage some stuff on the file system, run 6 /// tests are integration tests that stage some stuff on the file system, run
7 /// pub, and then validate the results. This library provides an API to build 7 /// pub, and then validate the results. This library provides an API to build
8 /// tests like that. 8 /// tests like that.
9 library test_pub; 9 library test_pub;
10 10
(...skipping 29 matching lines...) Expand all
40 import '../../pub/validator.dart'; 40 import '../../pub/validator.dart';
41 import 'command_line_config.dart'; 41 import 'command_line_config.dart';
42 import 'descriptor.dart' as d; 42 import 'descriptor.dart' as d;
43 43
44 /// This should be called at the top of a test file to set up an appropriate 44 /// This should be called at the top of a test file to set up an appropriate
45 /// test configuration for the machine running the tests. 45 /// test configuration for the machine running the tests.
46 initConfig() { 46 initConfig() {
47 // If we aren't running on the bots, use the human-friendly config. 47 // If we aren't running on the bots, use the human-friendly config.
48 if (!runningOnBuildbot) { 48 if (!runningOnBuildbot) {
49 unittestConfiguration = new CommandLineConfiguration(); 49 unittestConfiguration = new CommandLineConfiguration();
50
51 // By default, don't capture stack traces since they slow the tests way
52 // down. To debug failing tests, comment this out.
53 captureStackTraces = false;
nweiz 2013/04/09 21:25:58 I'd rather put this in [integration], especially o
Bob Nystrom 2013/04/10 22:40:34 Done.
50 } 54 }
51 } 55 }
52 56
53 /// Returns whether we're running on a Dart build bot. 57 /// Returns whether we're running on a Dart build bot.
54 bool get runningOnBuildbot => 58 bool get runningOnBuildbot =>
55 Platform.environment.containsKey('BUILDBOT_BUILDERNAME'); 59 Platform.environment.containsKey('BUILDBOT_BUILDERNAME');
56 60
57 /// The current [HttpServer] created using [serve]. 61 /// The current [HttpServer] created using [serve].
58 var _server; 62 var _server;
59 63
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 bool matches(item, MatchState matchState) { 609 bool matches(item, MatchState matchState) {
606 if (item is! Pair) return false; 610 if (item is! Pair) return false;
607 return _firstMatcher.matches(item.first, matchState) && 611 return _firstMatcher.matches(item.first, matchState) &&
608 _lastMatcher.matches(item.last, matchState); 612 _lastMatcher.matches(item.last, matchState);
609 } 613 }
610 614
611 Description describe(Description description) { 615 Description describe(Description description) {
612 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]); 616 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
613 } 617 }
614 } 618 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698