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

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

Issue 2693893004: Fix two problems with the analyzer suite: (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 | « pkg/testing/lib/src/run.dart ('k') | 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_tests.dart
diff --git a/pkg/testing/lib/src/run_tests.dart b/pkg/testing/lib/src/run_tests.dart
index 937e1eafdcf63a79668b0ec7bc63b136bca1d6d7..bc29a3baa0df48013d743562dc2cdd33f58ece13 100644
--- a/pkg/testing/lib/src/run_tests.dart
+++ b/pkg/testing/lib/src/run_tests.dart
@@ -38,9 +38,6 @@ import 'run.dart' show
SuiteRunner,
runProgram;
-import 'suite.dart' show
- Suite;
-
class CommandLine {
final Set<String> options;
final List<String> arguments;
@@ -167,18 +164,15 @@ main(List<String> arguments) => withErrorHandling(() async {
print("Use --verbose to display more details.");
}
TestRoot root = await TestRoot.fromUri(configuration);
- Set<String> skip = cl.skip;
- Set<String> selectedSuites = cl.selectedSuites;
- List<Suite> suites = root.suites.where((s) {
- return !skip.contains(s.name) &&
- (selectedSuites.isEmpty || selectedSuites.contains(s.name));
- }).toList();
- SuiteRunner runner = new SuiteRunner(suites, environment, cl.selectors);
+ SuiteRunner runner = new SuiteRunner(root.suites, environment, cl.selectors,
+ cl.selectedSuites, cl.skip);
String program = await runner.generateDartProgram();
- await runner.analyze(root.packages);
+ bool hasAnalyzerSuites = await runner.analyze(root.packages);
Stopwatch sw = new Stopwatch()..start();
if (program == null) {
- fail("No tests configured.");
+ if (!hasAnalyzerSuites) {
+ fail("No tests configured.");
+ }
} else {
await runProgram(program, root.packages);
}
« no previous file with comments | « pkg/testing/lib/src/run.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698