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

Unified Diff: pkg/testing/lib/src/run.dart

Issue 2697513004: Fix problem in previous CL: analyzer was alway run, and nothing else. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/run.dart
diff --git a/pkg/testing/lib/src/run.dart b/pkg/testing/lib/src/run.dart
index 600865f4f0529ecee23069dfa6548393c0f547ca..2f9fedaf3169fe67b9ff05b978857cbf4def88cc 100644
--- a/pkg/testing/lib/src/run.dart
+++ b/pkg/testing/lib/src/run.dart
@@ -195,15 +195,17 @@ class SuiteRunner {
bool isFirstTestDartSuite = true;
for (TestDart suite in listTestDartSuites()) {
- hasRunnableTests = true;
- if (!isFirstTestDartSuite) {
- suite.writeFirstImportOn(imports);
+ if (shouldRunSuite(suite)) {
+ hasRunnableTests = true;
+ if (isFirstTestDartSuite) {
+ suite.writeFirstImportOn(imports);
+ }
+ isFirstTestDartSuite = false;
+ suite.writeRunCommandOn(chain);
}
- isFirstTestDartSuite = true;
- suite.writeRunCommandOn(chain);
}
- if (hasRunnableTests) return null;
+ if (!hasRunnableTests) return null;
return """
library testing.generated;
@@ -235,8 +237,10 @@ Future<Null> main() async {
Future<bool> analyze(Uri packages) async {
bool hasAnalyzerSuites = false;
for (Analyze suite in listAnalyzerSuites()) {
- hasAnalyzerSuites = true;
- await suite.run(packages, testUris);
+ if (shouldRunSuite(suite)) {
+ hasAnalyzerSuites = true;
+ await suite.run(packages, testUris);
+ }
}
return hasAnalyzerSuites;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698