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

Side by Side Diff: utils/testrunner/layout_test_runner.dart

Issue 59093003: Remove unmaintained utils/testrunner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « utils/testrunner/layout_test_controller.dart ('k') | utils/testrunner/options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4
5 part of layout_test;
6
7 // The filters must be set by the caller that #sources this file.
8 List includeFilters;
9 List excludeFilters;
10
11 /**
12 * A special marker string used to separate group names and
13 * identify non-debug output.
14 */
15 final marker = '###';
16
17 class LayoutTestConfiguration extends unittest.Configuration {
18 get autoStart => false;
19 void onTestResult(unittest.TestCase testCase) {
20 window.postMessage('done', '*'); // Unblock DRT
21 }
22 }
23
24 filterTest(t) {
25 var name = t.description.replaceAll(marker, " ");
26 if (includeFilters.length > 0) {
27 for (var f in includeFilters) {
28 if (name.indexOf(f) >= 0) return true;
29 }
30 return false;
31 } else if (excludeFilters.length > 0) {
32 for (var f in excludeFilters) {
33 if (name.indexOf(f) >= 0) return false;
34 }
35 return true;
36 } else {
37 return true;
38 }
39 }
40
41 runTests(testMain) {
42 unittest.groupSep = marker;
43 unittest.unittestConfiguration = new LayoutTestConfiguration();
44
45 // Create the set of test cases.
46 unittest.group('', testMain);
47
48 // Do any user-specified test filtering.
49 unittest.filterTests(filterTest);
50
51 // Filter to the test number in the search query.
52 var testNum = int.parse(window.location.search.substring(6));
53 if (testNum < 0 || testNum >= unittest.testCases.length) {
54 print('#TEST NONEXISTENT');
55 window.postMessage('done', '*'); // Unblock DRT
56 } else {
57 var name = unittest.testCases[testNum].description;
58 print('#TEST $name');
59 unittest.filterTests(name);
60 // Run the test.
61 print('Tests - ${unittest.testCases.length}');
62 unittest.runTests();
63 }
64 }
OLDNEW
« no previous file with comments | « utils/testrunner/layout_test_controller.dart ('k') | utils/testrunner/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698