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

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

Issue 1845563003: Skip checking of IMPORT_EXPERIMENTAL_MIRRORS warning in analyze_test_test. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 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 | « tests/compiler/dart2js/analyze_helper.dart ('k') | no next file » | 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 5d6037318ed25fa393f882740f420b80b4b671db..4a2321b904695f6dfaff2c5edcc306869860447a 100644
--- a/tests/compiler/dart2js/analyze_test_test.dart
+++ b/tests/compiler/dart2js/analyze_test_test.dart
@@ -26,10 +26,6 @@ import 'memory_compiler.dart';
*/
// TODO(johnniwinther): Support canonical URIs as keys.
const Map<String, List/*<String|MessageKind>*/> WHITE_LIST = const {
- // Several tests import mirrors; any of these might trigger the warning.
- ".dart": const [
- MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
- ],
"/test/src/util/": const [
"Library 'package:async/async.dart' doesn't export a "
"'ForkableStream' declaration.",
@@ -55,24 +51,50 @@ const List<String> SKIP_LIST = const <String>[
"http_test.dart",
];
+const List<MessageKind> MESSAGE_SKIP_LIST = const <MessageKind>[
+ // TODO(johnniwinther): Support checking of this warning. (Issue 26132)
+ MessageKind.IMPORT_EXPERIMENTAL_MIRRORS,
+];
+
main(List<String> arguments) {
List<String> options = <String>[];
if (arguments.contains('-v') || arguments.contains(Flags.verbose)) {
options.add(Flags.verbose);
}
+ List<Uri> uriList = <Uri>[];
+ 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))));
+ }
+ }
+ }
+ }
+ }
+
asyncTest(() async {
- List<Uri> uriList = <Uri>[];
- Directory dir =
- new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
- 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 (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
- uriList.add(file);
+ if (uriList.isEmpty) {
+ Directory dir =
+ new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
+ 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 (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
+ uriList.add(file);
+ }
}
}
}
await analyze(
- uriList, WHITE_LIST, mode: AnalysisMode.URI, options: options);
+ uriList,
+ WHITE_LIST,
+ mode: AnalysisMode.URI,
+ options: options,
+ skipList: MESSAGE_SKIP_LIST);
});
}
« no previous file with comments | « tests/compiler/dart2js/analyze_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698