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

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

Issue 12776004: Add support for the new analyzer to the testing scripts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « 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: tools/testing/dart/test_suite.dart
===================================================================
--- tools/testing/dart/test_suite.dart (revision 19852)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -142,6 +142,7 @@
var name;
switch (configuration['compiler']) {
case 'dartc':
+ case 'new_analyzer':
name = executablePath;
case 'dart2js':
case 'dart2dart':
@@ -181,6 +182,9 @@
return '$buildDir/dart$suffix';
case 'dartc':
return '$buildDir/analyzer/bin/dart_analyzer$suffix';
+ case 'new_analyzer':
+ var prefix = 'sdk/bin/';
+ return '$prefix/analyzer$suffix';
default:
throw "Unknown executable for: ${configuration['compiler']}";
}
@@ -699,8 +703,8 @@
isNegative = true;
}
- if (configuration['compiler'] == 'dartc') {
- // dartc can detect static type warnings by the
+ if (configuration['analyzer']) {
+ // An analyzer can detect static type warnings by the
// format of the error line
if (info.hasFatalTypeErrors) {
isNegative = true;
@@ -775,6 +779,7 @@
case 'none':
case 'dartc':
+ case 'new_analyzer':
var arguments = new List.from(vmOptions);
arguments.addAll(args);
return <Command>[new Command(dartShellFileName, arguments)];
@@ -1163,6 +1168,7 @@
case 'dart2dart':
return 'application/dart';
case 'dart2js':
+ case 'new_analyzer':
case 'dartc':
return 'text/javascript';
default:
@@ -1223,7 +1229,7 @@
args.add(packageRoot);
}
args.addAll(additionalOptions(filePath));
- if (configuration['compiler'] == 'dartc') {
+ if (configuration['analyzer']) {
args.add('--error_format');
args.add('machine');
}
@@ -1599,7 +1605,7 @@
doTest = onTest;
doDone = onDone;
- if (configuration['compiler'] != 'dartc') {
+ if (!configuration['analyzer']) {
// Do nothing. Asynchronously report that the suite is enqueued.
asynchronously(doDone);
return;
@@ -1853,6 +1859,9 @@
static bool isJsCommandLineRuntime(String runtime) =>
const ['d8', 'jsshell'].contains(runtime);
+ static bool isCommandLineAnalyzer(String compiler) =>
+ compiler == 'dartc' || compiler == 'new_analyzer';
+
static String buildDir(Map configuration) {
// FIXME(kustermann,ricow): Our code assumes that the returned 'buildDir'
// is relative to the current working directory.
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698