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

Side by Side Diff: tools/gn/variables.cc

Issue 524623005: Add testonly flag to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "tools/gn/variables.h" 5 #include "tools/gn/variables.h"
6 6
7 namespace variables { 7 namespace variables {
8 8
9 // Built-in variables ---------------------------------------------------------- 9 // Built-in variables ----------------------------------------------------------
10 10
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 " \"gn help action_foreach\").\n"; 731 " \"gn help action_foreach\").\n";
732 732
733 const char kSources[] = "sources"; 733 const char kSources[] = "sources";
734 const char kSources_HelpShort[] = 734 const char kSources_HelpShort[] =
735 "sources: [file list] Source files for a target."; 735 "sources: [file list] Source files for a target.";
736 const char kSources_Help[] = 736 const char kSources_Help[] =
737 "sources: Source files for a target\n" 737 "sources: Source files for a target\n"
738 "\n" 738 "\n"
739 " A list of files relative to the current buildfile.\n"; 739 " A list of files relative to the current buildfile.\n";
740 740
741 const char kTestonly[] = "testonly";
742 const char kTestonly_HelpShort[] =
743 "testonly: [boolean] Declares a target must only be used for testing.";
744 const char kTestonly_Help[] =
745 "testonly: Declares a target must only be used for testing.\n"
746 "\n"
747 " Boolean. Defaults to false.\n"
748 "\n"
749 " When a target is marked \"testonly = true\", it must only be depended\n"
750 " on by other test-only targets. Otherwise, GN will issue an error\n"
751 " that the depenedency is not allowed.\n"
752 "\n"
753 " This feature is intended to prevent accidentally shipping test code\n"
754 " in a final product.\n"
755 "\n"
756 "Example\n"
757 "\n"
758 " source_set(\"test_support\") {\n"
759 " testonly = true\n"
760 " ...\n"
761 " }\n";
762
741 const char kVisibility[] = "visibility"; 763 const char kVisibility[] = "visibility";
742 const char kVisibility_HelpShort[] = 764 const char kVisibility_HelpShort[] =
743 "visibility: [label list] A list of labels that can depend on a target."; 765 "visibility: [label list] A list of labels that can depend on a target.";
744 const char kVisibility_Help[] = 766 const char kVisibility_Help[] =
745 "visibility: A list of labels that can depend on a target.\n" 767 "visibility: A list of labels that can depend on a target.\n"
746 "\n" 768 "\n"
747 " A label or a list of labels and label patterns that define which\n" 769 " A label or a list of labels and label patterns that define which\n"
748 " targets can depend on the current one. These permissions are checked\n" 770 " targets can depend on the current one. These permissions are checked\n"
749 " via then \"check\" command (see \"gn help check\").\n" 771 " via then \"check\" command (see \"gn help check\").\n"
750 "\n" 772 "\n"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 INSERT_VARIABLE(Inputs) 871 INSERT_VARIABLE(Inputs)
850 INSERT_VARIABLE(Ldflags) 872 INSERT_VARIABLE(Ldflags)
851 INSERT_VARIABLE(Libs) 873 INSERT_VARIABLE(Libs)
852 INSERT_VARIABLE(LibDirs) 874 INSERT_VARIABLE(LibDirs)
853 INSERT_VARIABLE(OutputExtension) 875 INSERT_VARIABLE(OutputExtension)
854 INSERT_VARIABLE(OutputName) 876 INSERT_VARIABLE(OutputName)
855 INSERT_VARIABLE(Outputs) 877 INSERT_VARIABLE(Outputs)
856 INSERT_VARIABLE(Public) 878 INSERT_VARIABLE(Public)
857 INSERT_VARIABLE(Script) 879 INSERT_VARIABLE(Script)
858 INSERT_VARIABLE(Sources) 880 INSERT_VARIABLE(Sources)
881 INSERT_VARIABLE(Testonly)
859 INSERT_VARIABLE(Visibility) 882 INSERT_VARIABLE(Visibility)
860 } 883 }
861 return info_map; 884 return info_map;
862 } 885 }
863 886
864 #undef INSERT_VARIABLE 887 #undef INSERT_VARIABLE
865 888
866 } // namespace variables 889 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698