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

Unified Diff: tools/gn/analyzer_unittest.cc

Issue 2350963006: Fix an issue in `gn analyze` when building all. (Closed)
Patch Set: use nico's union code 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') | tools/mb/mb.py » ('j') | 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 4d5c8d461dea7cc6a36a0546f769d196f30a74bd..a3c8d5becb7b31b6a0270d5d87139697ac8ad33a 100644
--- a/tools/gn/analyzer_unittest.cc
+++ b/tools/gn/analyzer_unittest.cc
@@ -212,7 +212,24 @@ TEST_F(AnalyzerTest, BuildFilesWereModified) {
" \"test_targets\": [ \"//:a\" ]"
"}",
"{"
- "\"compile_targets\":[],"
+ "\"compile_targets\":[\"//:a\"],"
+ "\"status\":\"Found dependency (all)\","
+ "\"test_targets\":[\"//:a\"]"
+ "}");
+}
+
+TEST_F(AnalyzerTest, BuildFilesWereModifiedAndCompilingAll) {
+ // 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\": [ \"all\" ],"
+ " \"test_targets\": [ \"//:a\" ]"
+ "}",
+ "{"
+ "\"compile_targets\":[\"all\"],"
"\"status\":\"Found dependency (all)\","
"\"test_targets\":[\"//:a\"]"
"}");
« no previous file with comments | « tools/gn/analyzer.cc ('k') | tools/mb/mb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698