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); |
} |