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

Unified Diff: tests/compiler/dart2js/analyze_test_test.dart

Issue 1973753004: Change dart2js.dart to use compiler_new.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/compiler/lib/src/source_file_provider.dart ('k') | tests/compiler/dart2js/bad_output_io_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_test_test.dart
diff --git a/tests/compiler/dart2js/analyze_test_test.dart b/tests/compiler/dart2js/analyze_test_test.dart
index a38c814c37d47ba5a7bc9c3d1eb77443ddae13fd..8f544cbb7480e470427c63b03580dea461e5952c 100644
--- a/tests/compiler/dart2js/analyze_test_test.dart
+++ b/tests/compiler/dart2js/analyze_test_test.dart
@@ -66,17 +66,23 @@ main(List<String> arguments) {
}
}
List<Uri> uriList = <Uri>[];
+ String filter;
for (String arg in arguments) {
if (!arg.startsWith('-')) {
- for (String line in new File(arg).readAsLinesSync()) {
- line = line.trim();
- if (line.startsWith('Analyzing uri: ')) {
- int filenameOffset = line.indexOf('tests/compiler/dart2js/');
- if (filenameOffset != -1) {
- uriList.add(Uri.base.resolve(
- nativeToUriPath(line.substring(filenameOffset))));
+ File file = new File(arg);
+ if (file.existsSync()) {
+ for (String line in file.readAsLinesSync()) {
+ line = line.trim();
+ if (line.startsWith('Analyzing uri: ')) {
+ int filenameOffset = line.indexOf('tests/compiler/dart2js/');
+ if (filenameOffset != -1) {
+ uriList.add(Uri.base.resolve(
+ nativeToUriPath(line.substring(filenameOffset))));
+ }
}
}
+ } else {
Siggi Cherem (dart-lang) 2016/05/14 00:21:35 does this relates to the other changes in this CL?
Johnni Winther 2016/05/17 10:22:39 Nah. It was used to help create the CL, though.
+ filter = arg;
}
}
}
@@ -88,6 +94,9 @@ main(List<String> arguments) {
for (FileSystemEntity entity in dir.listSync(recursive: true)) {
if (entity is File && entity.path.endsWith('.dart')) {
Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
+ if (filter != null && !'$file'.contains(filter)) {
+ continue;
+ }
if (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
uriList.add(file);
}
« no previous file with comments | « pkg/compiler/lib/src/source_file_provider.dart ('k') | tests/compiler/dart2js/bad_output_io_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698