Chromium Code Reviews| Index: tools/testing/dart/test_suite.dart |
| diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart |
| index 8f9e9966f0ce6179855da6506a4b77ea005a67ed..6a6ca6e88211da3ff966648a16fcd97dba266cde 100644 |
| --- a/tools/testing/dart/test_suite.dart |
| +++ b/tools/testing/dart/test_suite.dart |
| @@ -362,7 +362,6 @@ abstract class TestSuite { |
| } |
| String createPubspecCheckoutDirectory(Path directoryOfPubspecYaml) { |
| - var relativeDir = directoryOfPubspecYaml.relativeTo(TestUtils.dartDir); |
| var sdk = configuration['use_sdk'] ? '-sdk' : ''; |
| var pkg = configuration['use_public_packages'] |
| ? 'public_packages' : 'repo_packages'; |
| @@ -371,7 +370,6 @@ abstract class TestSuite { |
| } |
| String createPubPackageBuildsDirectory(Path directoryOfPubspecYaml) { |
| - var relativeDir = directoryOfPubspecYaml.relativeTo(TestUtils.dartDir); |
| var pkg = configuration['use_public_packages'] |
| ? 'public_packages' : 'repo_packages'; |
| return createGeneratedTestDirectoryHelper( |
| @@ -776,14 +774,11 @@ class StandardTestSuite extends TestSuite { |
| } |
| void enqueueDirectory(Directory dir, FutureGroup group) { |
| - var listCompleter = new Completer(); |
| - group.add(listCompleter.future); |
| - |
| var lister = dir.list(recursive: listRecursively) |
| - .listen((FileSystemEntity fse) { |
| + .forEach((FileSystemEntity fse) { |
|
ricow1
2014/12/04 13:14:04
.where((fse) => fse is File)
.forEach((fse) => enq
|
| if (fse is File) enqueueFile(fse.path, group); |
| - }, |
| - onDone: listCompleter.complete); |
| + }); |
| + group.add(lister); |
| } |
| void enqueueFile(String filename, FutureGroup group) { |
| @@ -1127,7 +1122,6 @@ class StandardTestSuite extends TestSuite { |
| File file = new File(dartWrapperFilename); |
| RandomAccessFile dartWrapper = file.openSync(mode: FileMode.WRITE); |
| - var usePackageImport = localDartLibraryFilename.segments().contains("pkg"); |
| var libraryPathComponent = _createUrlPathFromFile(localDartLibraryFilename); |
| var generatedSource = dartTestWrapper(libraryPathComponent); |
| dartWrapper.writeStringSync(generatedSource); |
| @@ -1200,8 +1194,6 @@ class StandardTestSuite extends TestSuite { |
| Path dir = filePath.directoryPath; |
| String nameNoExt = filePath.filenameWithoutExtension; |
| - Path pngPath = dir.append('$nameNoExt.png'); |
| - Path txtPath = dir.append('$nameNoExt.txt'); |
| String customHtmlPath = dir.append('$nameNoExt.html').toNativePath(); |
| File customHtml = new File(customHtmlPath); |
| @@ -1323,8 +1315,6 @@ class StandardTestSuite extends TestSuite { |
| var fullHtmlPath = |
| _getUriForBrowserTest(htmlPath_subtest, subtestName).toString(); |
| - List<String> args = <String>[]; |
| - |
| if (runtime == "drt") { |
| var dartFlags = []; |
| var contentShellOptions = []; |
| @@ -1456,14 +1446,11 @@ class StandardTestSuite extends TestSuite { |
| Command _compileCommand(String inputFile, String outputFile, |
| String compiler, String dir, optionsFromFile) { |
| assert (['dart2js', 'dart2dart'].contains(compiler)); |
| - String executable; |
| List<String> args; |
| if (compilerPath.endsWith('.dart')) { |
| // Run the compiler script via the Dart VM. |
| - executable = dartVmBinaryFileName; |
| args = [compilerPath]; |
| } else { |
| - executable = compilerPath; |
| args = []; |
| } |
| args.addAll(TestUtils.standardOptions(configuration)); |
| @@ -1912,7 +1899,6 @@ class AnalyzeLibraryTestSuite extends DartcCompilationTestSuite { |
| } |
| bool isTestFile(String filename) { |
| - var sep = Platform.pathSeparator; |
| // NOTE: We exclude tests and patch files for now. |
| return filename.endsWith(".dart") && |
| !filename.endsWith("_test.dart") && |
| @@ -2016,8 +2002,6 @@ class PkgBuildTestSuite extends TestSuite { |
| } |
| doTest = onTest; |
| - Map<String, String> _localPackageDirectories; |
| - Map<String, String> _localSampleDirectories; |
| List<String> statusFiles = [ |
| TestUtils.dartDir.join(new Path(statusFilePath)).toNativePath()]; |
| ReadTestExpectations(statusFiles, configuration).then((expectations) { |