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

Unified Diff: tools/gn/analyzer_unittest.cc

Issue 2355713002: Fix a bug in `gn analyze` related to build-only changes. (Closed)
Patch Set: Created 4 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 | « tools/gn/analyzer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/analyzer_unittest.cc
diff --git a/tools/gn/analyzer_unittest.cc b/tools/gn/analyzer_unittest.cc
index dba0e7701dd8a7d8af7feb3e2a3ad02acd8909d7..4d5c8d461dea7cc6a36a0546f769d196f30a74bd 100644
--- a/tools/gn/analyzer_unittest.cc
+++ b/tools/gn/analyzer_unittest.cc
@@ -200,3 +200,20 @@ TEST_F(AnalyzerTest, WrongInputFields) {
"\"invalid_targets\":[]"
"}");
}
+
+TEST_F(AnalyzerTest, BuildFilesWereModified) {
+ // This tests that if a build file is modified, we bail out early with
+ // "Found dependency (all)" error since we can't handle changes to
+ // build files yet (crbug.com/555273).
+ RunBasicTest(
+ "{"
+ " \"files\": [ \"//a.cc\", \"//BUILD.gn\" ],"
+ " \"additional_compile_targets\": [],"
+ " \"test_targets\": [ \"//:a\" ]"
+ "}",
+ "{"
+ "\"compile_targets\":[],"
+ "\"status\":\"Found dependency (all)\","
+ "\"test_targets\":[\"//:a\"]"
+ "}");
+}
« no previous file with comments | « tools/gn/analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698