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

Side by Side Diff: tests/stub-generator/test_config.dart

Issue 8835008: Correctly handle the --arch argument to dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo Created 9 years 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 | « no previous file | tools/test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 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 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 #library("stub_generator_test_config"); 5 #library("stub_generator_test_config");
6 6
7 #import("../../tools/testing/dart/test_suite.dart"); 7 #import("../../tools/testing/dart/test_suite.dart");
8 8
9 class StubGeneratorTestSuite extends StandardTestSuite { 9 class StubGeneratorTestSuite extends StandardTestSuite {
10 String dartcPath; 10 String dartcPath;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void generateTestCase(String filename, 74 void generateTestCase(String filename,
75 String interfaceFile, 75 String interfaceFile,
76 String classes, 76 String classes,
77 Function onGenerated) { 77 Function onGenerated) {
78 testGeneratorStarted(); 78 testGeneratorStarted();
79 Directory temp = new Directory(''); 79 Directory temp = new Directory('');
80 temp.createTempSync(); 80 temp.createTempSync();
81 File stubsOutFile = new File("${temp.path}/${interfaceFile}"); 81 File stubsOutFile = new File("${temp.path}/${interfaceFile}");
82 stubsOutFile.createSync(); 82 stubsOutFile.createSync();
83 String stubsPath = stubsOutFile.fullPathSync(); 83 String stubsPath = stubsOutFile.fullPathSync();
84 Process dartcProcess = new Process(dartcPath, 84 List<String> args = [filename,
85 [filename, 85 '-noincremental',
86 '-noincremental', 86 '-out', temp.path,
87 '-out', temp.path, 87 '-isolate-stub-out', stubsPath,
88 '-isolate-stub-out', stubsPath, 88 '-generate-isolate-stubs', classes ];
89 '-generate-isolate-stubs', classes ]); 89 if (configuration['verbose']) {
90 print("# $dartcPath ${Strings.join(args, ' ')}");
91 }
92 Process dartcProcess = new Process(dartcPath, args);
90 dartcProcess.exitHandler = (int exitCode) { 93 dartcProcess.exitHandler = (int exitCode) {
91 combineFiles(filename, stubsPath, onGenerated); 94 combineFiles(filename, stubsPath, onGenerated);
92 }; 95 };
93 dartcProcess.start(); 96 dartcProcess.start();
94 } 97 }
95 98
96 void processFile(String filename) { 99 void processFile(String filename) {
97 // Only run the tests that match the pattern. 100 // Only run the tests that match the pattern.
98 RegExp pattern = configuration['selectors'][suiteName]; 101 RegExp pattern = configuration['selectors'][suiteName];
99 if (!pattern.hasMatch(filename)) return; 102 if (!pattern.hasMatch(filename)) return;
(...skipping 13 matching lines...) Expand all
113 String interfaceFile = splitIsolateStubsOptions[0]; 116 String interfaceFile = splitIsolateStubsOptions[0];
114 String classes = splitIsolateStubsOptions[1]; 117 String classes = splitIsolateStubsOptions[1];
115 generateTestCase(filename, interfaceFile, classes, (String filename) { 118 generateTestCase(filename, interfaceFile, classes, (String filename) {
116 createTestCase(filename, optionsFromFile['isNegative']); 119 createTestCase(filename, optionsFromFile['isNegative']);
117 testGeneratorDone(); 120 testGeneratorDone();
118 }); 121 });
119 } 122 }
120 } 123 }
121 } 124 }
122 } 125 }
OLDNEW
« no previous file with comments | « no previous file | tools/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698