OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <algorithm> | 5 #include <algorithm> |
6 #include <iterator> | 6 #include <iterator> |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 "\n" | 27 "\n" |
28 " This command takes three arguments:\n" | 28 " This command takes three arguments:\n" |
29 "\n" | 29 "\n" |
30 " out_dir is the path to the build directory.\n" | 30 " out_dir is the path to the build directory.\n" |
31 "\n" | 31 "\n" |
32 " input_path is a path to a file containing a JSON object with three\n" | 32 " input_path is a path to a file containing a JSON object with three\n" |
33 " fields:\n" | 33 " fields:\n" |
34 "\n" | 34 "\n" |
35 " - \"files\": A list of the filenames to check.\n" | 35 " - \"files\": A list of the filenames to check.\n" |
36 "\n" | 36 "\n" |
37 " - \"compile_targets\": A list of the labels targets that we wish to\n" | 37 " - \"test_targets\": A list of the labels for targets that\n" |
38 " rebuild, but aren't necessarily needed for testing. The\n" | 38 " are needed to run the tests we wish to run.\n" |
39 " important difference between this field and \"test_targets\"\n" | 39 "\n" |
40 " is that if an item in the compile_targets list is a group, then\n" | 40 " - \"additional_compile_targets\": A list of the labels for\n" |
| 41 " targets that we wish to rebuild, but aren't necessarily needed\n" |
| 42 " for testing. The important difference between this field and\n" |
| 43 " \"test_targets\" is that if an item in the\n" |
| 44 " additional_compile_targets list refers to a group, then\n" |
41 " any dependencies of that group will be returned if they are out\n" | 45 " any dependencies of that group will be returned if they are out\n" |
42 " of date, but the group itself does not need to be. If the\n" | 46 " of date, but the group itself does not need to be. If the\n" |
43 " dependencies themselves are groups, the same filtering is\n" | 47 " dependencies themselves are groups, the same filtering is\n" |
44 " repeated. This filtering can be used to avoid rebuilding\n" | 48 " repeated. This filtering can be used to avoid rebuilding\n" |
45 " dependencies of a group that are unaffected by the input files.\n" | 49 " dependencies of a group that are unaffected by the input files.\n" |
46 " The list may contain the string \"all\" to refer to a\n" | 50 " The list may also contain the string \"all\" to refer to a\n" |
47 " pseudo-group that contains every root target in the build graph.\n" | 51 " pseudo-group that contains every root target in the build\n" |
| 52 " graph.\n" |
48 "\n" | 53 "\n" |
49 " This filtering behavior is also known as \"pruning\" the list\n" | 54 " This filtering behavior is also known as \"pruning\" the list\n" |
50 " of compile targets.\n" | 55 " of compile targets.\n" |
51 "\n" | 56 "\n" |
52 " - \"test_targets\": A list of the labels for targets that\n" | |
53 " are needed to run the tests we wish to run. Unlike\n" | |
54 " \"compile_targets\", this list may not contain the string \"all\",\n" | |
55 " because having a test be dependent on everything in the build\n" | |
56 " would be silly.\n" | |
57 "\n" | |
58 " output_path is a path indicating where the results of the command\n" | 57 " output_path is a path indicating where the results of the command\n" |
59 " are to be written. The results will be a file containing a JSON\n" | 58 " are to be written. The results will be a file containing a JSON\n" |
60 " object with one or more of following fields:\n" | 59 " object with one or more of following fields:\n" |
61 "\n" | 60 "\n" |
62 " - \"compile_targets\": A list of the labels derived from the input\n" | 61 " - \"compile_targets\": A list of the labels derived from the input\n" |
63 " compile_targets list that are affected by the input files.\n" | 62 " compile_targets list that are affected by the input files.\n" |
64 " Due to the way the filtering works for compile targets as\n" | 63 " Due to the way the filtering works for compile targets as\n" |
65 " described above, this list may contain targets that do not appear\n" | 64 " described above, this list may contain targets that do not appear\n" |
66 " in the input list.\n" | 65 " in the input list.\n" |
67 "\n" | 66 "\n" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 WriteFile(UTF8ToFilePath(args[2]), output, &err); | 129 WriteFile(UTF8ToFilePath(args[2]), output, &err); |
131 if (err.has_error()) { | 130 if (err.has_error()) { |
132 err.PrintToStdout(); | 131 err.PrintToStdout(); |
133 return 1; | 132 return 1; |
134 } | 133 } |
135 | 134 |
136 return 0; | 135 return 0; |
137 } | 136 } |
138 | 137 |
139 } // namespace commands | 138 } // namespace commands |
OLD | NEW |