Chromium Code Reviews| Index: dart/tools/testing/dart/test_suite.dart |
| diff --git a/dart/tools/testing/dart/test_suite.dart b/dart/tools/testing/dart/test_suite.dart |
| index c639485afa0d385d9ed515587ee38c08bb1b2e1f..f1d7011119f3dabeb995a0d4716b5e9517b8eada 100644 |
| --- a/dart/tools/testing/dart/test_suite.dart |
| +++ b/dart/tools/testing/dart/test_suite.dart |
| @@ -823,15 +823,20 @@ class StandardTestSuite extends TestSuite { |
| case 'dartanalyzer': |
| case 'dart2analyzer': |
| - return <Command>[CommandBuilder.instance.getAnalysisCommand( |
| - compiler, dartShellFileName, args, configurationDir, |
| - flavor: compiler)]; |
| + return <Command>[makeAnalysisCommand(info, args)]; |
| default: |
| throw 'Unknown compiler ${configuration["compiler"]}'; |
| } |
| } |
| + AnalysisCommand makeAnalysisCommand(TestInformation info, |
| + List<String> arguments) { |
| + return CommandBuilder.instance.getAnalysisCommand( |
| + configuration['compiler'], dartShellFileName, arguments, |
| + configurationDir, flavor: configuration['compiler']); |
| + } |
| + |
| CreateTest makeTestCaseCreator(Map optionsFromFile) { |
| return (Path filePath, |
| bool hasCompileError, |
| @@ -1595,6 +1600,39 @@ class DartcCompilationTestSuite extends StandardTestSuite { |
| } |
| } |
| +class AnalyzeLibraryTestSuite extends DartcCompilationTestSuite { |
| + AnalyzeLibraryTestSuite(Map configuration) |
| + : super(configuration, |
| + 'analyze_library', |
| + 'sdk', |
| + [ 'lib' ], |
|
ricow1
2013/10/28 14:37:34
here you have spaces around the value, right below
kustermann
2013/10/28 14:47:20
Done.
|
| + ['tests/lib/analyzer/analyze_library.status']); |
| + |
| + List<String> additionalOptions(Path filePath, {bool showSdkWarnings}) { |
| + var options = super.additionalOptions(filePath); |
| + options.add('--show-sdk-warnings'); |
|
ricow1
2013/10/28 14:37:34
add a comment that this is deprecated
kustermann
2013/10/28 14:47:20
Done.
|
| + return options; |
| + } |
| + |
| + bool isTestFile(String filename) { |
| + var sep = Platform.pathSeparator; |
| + return filename.endsWith(".dart") && !filename.contains("_internal"); |
| + } |
| + |
| + AnalysisCommand makeAnalysisCommand(TestInformation info, |
| + List<String> arguments) { |
| + bool fileFilter(String filepath) { |
| + return filepath == "${info.originTestPath}"; |
| + } |
| + |
| + return CommandBuilder.instance.getAnalysisCommand( |
| + configuration['compiler'], dartShellFileName, arguments, |
| + configurationDir, flavor: configuration['compiler'], |
| + fileFilter: fileFilter); |
| + } |
| + |
| + bool get listRecursively => true; |
| +} |
| class JUnitTestSuite extends TestSuite { |
| String directoryPath; |