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

Unified Diff: dart/tools/testing/dart/scrub_status_file.dart

Issue 10918095: Tool for identifying stale co19 status lines. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 | dart/tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/scrub_status_file.dart
diff --git a/dart/tools/testing/dart/scrub_status_file.dart b/dart/tools/testing/dart/scrub_status_file.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ba0bfe2f9c00f54d59c2101e376e4c87311c68c6
--- /dev/null
+++ b/dart/tools/testing/dart/scrub_status_file.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * Tool for identifying stale test lines. Used when updating co19.
+ *
+ * Usage:
+ * [: ./tools/testing/bin/$OS/dart tools/testing/dart/scrub_status_file.dart :]
+ */
+
+// TODO(ahe): Consider generalizing this.
+
+#import('dart:io');
+
+#import('status_file_parser.dart');
+
+const List<String> CO19_STATUS_FILES = const <String>[
+ 'tests/co19/co19-compiler.status',
+ 'tests/co19/co19-dart2js.status',
+ 'tests/co19/co19-runtime.status'];
+
+void onSectionsRead(String statusFile, List sections) {
+ print('Read sections');
+ for (var section in sections) {
+ for (var rule in section.testRules) {
+ String path = 'tests/co19/src/${rule.name}.dart';
+ File file = new File(path);
+ if (!file.existsSync()) {
+ print('$statusFile: $path: no such file');
+ }
+ }
+ }
+}
+
+void readStatusFile(String path) {
+ var sections = [];
+ ReadConfigurationInto(path,
+ sections,
+ () => onSectionsRead(path, sections));
+}
+
+void main() {
+ CO19_STATUS_FILES.forEach(readStatusFile);
+}
« no previous file with comments | « no previous file | dart/tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698