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

Side by Side Diff: test/runner/runner_test.dart

Issue 1090513002: Support configuring timeouts per-test and -group. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Unused import. Created 5 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
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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 contains('nonexistent.dart: load error'), 239 contains('nonexistent.dart: load error'),
240 contains('Failed to load "nonexistent.dart": Does not exist.') 240 contains('Failed to load "nonexistent.dart": Does not exist.')
241 ])); 241 ]));
242 }); 242 });
243 243
244 // TODO(nweiz): test what happens when a test file is unreadable once issue 244 // TODO(nweiz): test what happens when a test file is unreadable once issue
245 // 15078 is fixed. 245 // 15078 is fixed.
246 }); 246 });
247 247
248 group("runs successful tests", () { 248 group("runs successful tests", () {
249 test("defined in a single file", () { 249 test("defined in a single file", () {
kevmoo 2015/04/15 02:51:34 This test now fails for me test/runner/runner_tes
nweiz 2015/04/15 20:03:47 That's probably because I left in the 0-length tim
250 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success); 250 new File(p.join(_sandbox, "test.dart")).writeAsStringSync(_success);
251 var result = _runUnittest(["test.dart"]); 251 var result = _runUnittest(["test.dart"]);
252 expect(result.exitCode, equals(0)); 252 expect(result.exitCode, equals(0));
253 }); 253 }, timeout: new Timeout(new Duration(seconds: 0)));
254 254
255 test("defined in a directory", () { 255 test("defined in a directory", () {
256 for (var i = 0; i < 3; i++) { 256 for (var i = 0; i < 3; i++) {
257 new File(p.join(_sandbox, "${i}_test.dart")) 257 new File(p.join(_sandbox, "${i}_test.dart"))
258 .writeAsStringSync(_success); 258 .writeAsStringSync(_success);
259 } 259 }
260 260
261 var result = _runUnittest(["."]); 261 var result = _runUnittest(["."]);
262 expect(result.exitCode, equals(0)); 262 expect(result.exitCode, equals(0));
263 }); 263 });
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 }); 439 });
440 }); 440 });
441 }); 441 });
442 } 442 }
443 443
444 ProcessResult _runUnittest(List<String> args) => 444 ProcessResult _runUnittest(List<String> args) =>
445 runUnittest(args, workingDirectory: _sandbox); 445 runUnittest(args, workingDirectory: _sandbox);
446 446
447 ProcessResult _runDart(List<String> args) => 447 ProcessResult _runDart(List<String> args) =>
448 runDart(args, workingDirectory: _sandbox); 448 runDart(args, workingDirectory: _sandbox);
OLDNEW
« lib/src/backend/declarer.dart ('K') | « test/backend/invoker_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698