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

Side by Side Diff: tests/standalone/test_config.dart

Issue 8492013: Add asynchronous test suite runner to Dart rewrite of test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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
OLDNEW
(Empty)
1 // Copyright (c) 2011, 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 #library("standalone_test_config");
6
7 #import("../../tools/testing/dart/test_runner.dart");
8
9
10 class StandaloneTestSuite {
11 final String VM_PATH =
12 "/usr/local/google/home/whesse/dart/out/Debug_ia32/dart_bin";
Mads Ager (google) 2011/11/08 08:26:06 All the same comments as for the other config file
13
14 Function handleTest;
15 Function doneCallback;
16 final String directoryPath = "tests/standalone/src";
17
18 StandaloneTestSuite();
19
20 void getTests(Function callback ,[Function done = null]) {
21 handleTest = callback;
22 doneCallback = done;
23 processDirectory();
24 }
25
26 void processDirectory() {
27 Directory dir = new Directory(directoryPath);
28 if (!dir.existsSync()) return null;
29 dir.fileHandler = processFile;
30 dir.doneHandler = doneCallback;
31 dir.list(false);
32 }
33
34 void processFile(String filename) {
35 if (filename.endsWith("Test.dart")) {
36 // TODO(whesse): Gather test case info from status file and test file.
37 handleTest(new TestCase(filename, VM_PATH,
38 ["--enable_type_checks",
39 "--ignore-unrecognized-flags",
40 filename ],
41 completeHandler,
42 new Set.from([PASS, FAIL, CRASH, TIMEOUT])));
43 }
44 }
45
46 void completeHandler(TestCase testCase) {
47 print("Exit code: ${testCase.output.exitCode} Time: ${testCase.output.tim e}");
48 }
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698