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

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

Issue 10897016: Testrunner for 3rd parties. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
(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 /**
6 * A test execution pipeline is made up of a list of tasks. Each task is a
7 * subclass of [PipelineTask].
8 */
9 abstract class PipelineTask {
10
11 abstract void execute(Path testfile, List stdout, List stderr,
12 bool verboseLogging, Function exitHandler);
13
14 String flattenPath(String path) {
15 return makePathAbsolute(path).
16 replaceAll(Platform.pathSeparator, "_").
17 replaceAll(":","");
18 }
19
20 // This takes a string used in a template and does macro expansion for
21 // a specific test file.
22 String expandMacros(String template, Path testfile) {
23 String path = makePathAbsolute(testfile.directoryPath.toString());
24 return template.
25 replaceAll(Macros.fullFilePath, testfile.toNativePath()).
26 replaceAll(Macros.filenameNoExtension,
27 testfile.filenameWithoutExtension).
28 replaceAll(Macros.filename, testfile.filename).
29 replaceAll(Macros.directory, path).
30 replaceAll(Macros.flattenedDirectory, flattenPath(path));
31 }
32 }
33
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698