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

Unified Diff: tests/stub-generator/test_config.dart

Issue 9195017: Generate stub-generator tests in the build directory, and do not commit them to repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix spacing around + Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/stub-generator/test_config.dart
diff --git a/tests/stub-generator/test_config.dart b/tests/stub-generator/test_config.dart
index 8d1f2887668f8c0276aea69e9c8c6252adf640cb..fe5ae448ea110806af409077ae6ad6c22c65183a 100644
--- a/tests/stub-generator/test_config.dart
+++ b/tests/stub-generator/test_config.dart
@@ -30,7 +30,20 @@ class StubGeneratorTestSuite extends StandardTestSuite {
File stubs = new File(stubsFile);
Expect.isTrue(filename.endsWith(".dart"));
String baseName = filename.substring(0, filename.length - 5);
- String resultPath = '${baseName}-generatedTest.dart';
+ // Find place in the buildDir at the same relative level as the test.
+ String resultPath = TestUtils.buildDir(configuration);
+ String relativeImportPath = '../../../tests/isolate/src/TestFramework.dart';
+ if (!new File('$resultPath/$relativeImportPath').existsSync()) {
+ resultPath = '$resultPath/generated_tests';
+ if (!new Directory(resultPath).existsSync()) {
+ new Directory(resultPath).createSync();
+ }
+ if (!new File('$resultPath/$relativeImportPath').existsSync()) {
+ throw new Exception('Cannot find $relativeImportPath from $resultPath');
+ }
+ }
+ int testNamePos = filename.lastIndexOf('/');
+ resultPath = '$resultPath/${filename.substring(testNamePos + 1)}';
File result = new File(resultPath);
StringInputStream origStream =
new StringInputStream(orig.openInputStream());
« no previous file with comments | « tests/stub-generator/src/MintMakerPromiseWithStubsTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698