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

Unified Diff: dart/tools/testing/dart/test_suite.dart

Issue 47743005: test.py: Run the analyzer on all dart files in the sdk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « dart/tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « dart/tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698