diff --git a/tools/test.dart b/tools/test.dart index f8cec4ce11e..21e1150d0a7 100755 --- a/tools/test.dart +++ b/tools/test.dart @@ -298,7 +298,6 @@ void testConfigurations(List configurations) { eventListener, allTestsFinished, verbose, - listTests, recordingPath, recordingOutputPath); } diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart index 26701552168..0cc35c21fd4 100644 --- a/tools/testing/dart/multitest.dart +++ b/tools/testing/dart/multitest.dart @@ -283,7 +283,6 @@ Future doMultitest(Path filePath, String outputDir, Path suiteDir, Path CreateMultitestDirectory(String outputDir, Path suiteDir) { - final String generatedTestDirectory = 'generated_tests'; Directory generatedTestDir = new Directory('$outputDir/generated_tests'); if (!new Directory(outputDir).existsSync()) { new Directory(outputDir).createSync(); diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart index e315c3465c4..1105c362e90 100644 --- a/tools/testing/dart/test_progress.dart +++ b/tools/testing/dart/test_progress.dart @@ -341,7 +341,6 @@ class TimingPrinter extends EventListener { var commandOutput = outputs[i]; var command = commandOutput.command; var testCases = _command2testCases[command]; - var duration = commandOutput.time; var testCasesDescription = testCases.map((testCase) { return "${testCase.configurationString}/${testCase.displayName}"; diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart index bf28d11163a..30c4a861e79 100644 --- a/tools/testing/dart/test_runner.dart +++ b/tools/testing/dart/test_runner.dart @@ -394,7 +394,6 @@ class CleanDirectoryCopyCommand extends ScriptCommand { Future run() { var watch = new Stopwatch()..start(); - var source = new io.Directory(_sourceDirectory); var destination = new io.Directory(_destinationDirectory); return destination.exists().then((bool exists) { @@ -1453,8 +1452,6 @@ class AnalysisCommandOutputImpl extends CommandOutputImpl { } void parseAnalyzerOutput(List outErrors, List outWarnings) { - AnalysisCommand analysisCommand = command; - // Parse a line delimited by the | character using \ as an escape charager // like: FOO|BAR|FOO\|BAR|FOO\\BAZ as 4 fields: FOO BAR FOO|BAR FOO\BAZ List splitMachineError(String line) { @@ -2770,7 +2767,6 @@ class TestCaseCompleter { class ProcessQueue { Map _globalConfiguration; - bool _listTests; Function _allDone; final dgraph.Graph _graph = new dgraph.Graph(); List _eventListener; @@ -2783,7 +2779,6 @@ class ProcessQueue { this._eventListener, this._allDone, [bool verbose = false, - this._listTests = false, String recordingOutputFile, String recordedInputFile]) { void setupForListing(TestCaseEnqueuer testCaseEnqueuer) { diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart index 8f9e9966f0c..703e685fca5 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,12 @@ 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) { - if (fse is File) enqueueFile(fse.path, group); - }, - onDone: listCompleter.complete); + .where((fse) => fse is File) + .forEach((File f) { + enqueueFile(f.path, group); + }); + group.add(lister); } void enqueueFile(String filename, FutureGroup group) { @@ -1127,7 +1123,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 +1195,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 +1316,6 @@ class StandardTestSuite extends TestSuite { var fullHtmlPath = _getUriForBrowserTest(htmlPath_subtest, subtestName).toString(); - List args = []; - if (runtime == "drt") { var dartFlags = []; var contentShellOptions = []; @@ -1456,14 +1447,11 @@ class StandardTestSuite extends TestSuite { Command _compileCommand(String inputFile, String outputFile, String compiler, String dir, optionsFromFile) { assert (['dart2js', 'dart2dart'].contains(compiler)); - String executable; List 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 +1900,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 +2003,6 @@ class PkgBuildTestSuite extends TestSuite { } doTest = onTest; - Map _localPackageDirectories; - Map _localSampleDirectories; List statusFiles = [ TestUtils.dartDir.join(new Path(statusFilePath)).toNativePath()]; ReadTestExpectations(statusFiles, configuration).then((expectations) {