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

Unified Diff: pkg/analyzer/tool/task_dependency_graph/check_test.dart

Issue 1408743006: Rework task model graphing to work on buildbots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/analyzer/tool/task_dependency_graph.dart ('k') | pkg/analyzer/tool/task_dependency_graph/generate.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/tool/task_dependency_graph/check_test.dart
diff --git a/pkg/analyzer/tool/task_dependency_graph/check_test.dart b/pkg/analyzer/tool/task_dependency_graph/check_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..a2d1118b1393c4be89acaf8132cc9d349d98b4b8
--- /dev/null
+++ b/pkg/analyzer/tool/task_dependency_graph/check_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2015, 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.
+
+library task_dependency_graph.check_test;
+
+import 'dart:io';
+
+import 'package:path/path.dart';
+
+import 'generate.dart';
+
+/**
+ * Check that the target file has been code generated. If it hasn't tell the
+ * user to run generate.dart.
+ */
+main() {
+ String script = Platform.script.toFilePath(windows: Platform.isWindows);
+ Driver driver = new Driver();
+ if (!driver.checkFile()) {
+ print('${driver.file.absolute} does not have expected contents.');
+ print('Please regenerate using:');
+ String executable = Platform.executable;
+ String packageRoot = '';
+ if (Platform.packageRoot.isNotEmpty) {
+ packageRoot = ' --package-root=${Platform.packageRoot}';
+ }
+ String generateScript = join(dirname(script), 'generate.dart');
+ print(' $executable$packageRoot $generateScript');
+ exit(1);
+ } else {
+ print('Generated file is up to date.');
+ }
+}
« no previous file with comments | « pkg/analyzer/tool/task_dependency_graph.dart ('k') | pkg/analyzer/tool/task_dependency_graph/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698