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

Side by Side Diff: build/config/BUILDCONFIG.gn

Issue 824263004: Move the test template to //testing/test.gni (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « breakpad/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | 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 # ============================================================================= 5 # =============================================================================
6 # BUILD FLAGS 6 # BUILD FLAGS
7 # ============================================================================= 7 # =============================================================================
8 # 8 #
9 # This block lists input arguments to the build, along with their default 9 # This block lists input arguments to the build, along with their default
10 # values. GN requires listing them explicitly so it can validate input and have 10 # values. GN requires listing them explicitly so it can validate input and have
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 } 710 }
711 if (defined(invoker.testonly)) { 711 if (defined(invoker.testonly)) {
712 testonly = invoker.testonly 712 testonly = invoker.testonly
713 } 713 }
714 if (defined(invoker.visibility)) { 714 if (defined(invoker.visibility)) {
715 visibility = invoker.visibility 715 visibility = invoker.visibility
716 } 716 }
717 } 717 }
718 } 718 }
719 } 719 }
720
721 # ==============================================================================
722 # TEST SETUP
723 # ==============================================================================
724
725 # Define a test as an executable (or shared_library on Android) with the
726 # "testonly" flag set.
727 template("test") {
728 if (is_android) {
729 shared_library(target_name) {
730 # Configs will always be defined since we set_defaults for a component
731 # above. We want to use those rather than whatever came with the nested
732 # shared/static library inside the component.
733 configs = [] # Prevent list overwriting warning.
734 configs = invoker.configs
735
736 # See above call.
737 set_sources_assignment_filter([])
738
739 testonly = true
740
741 if (defined(invoker.all_dependent_configs)) {
742 all_dependent_configs = invoker.all_dependent_configs
743 }
744 if (defined(invoker.allow_circular_includes_from)) {
745 allow_circular_includes_from = invoker.allow_circular_includes_from
746 }
747 if (defined(invoker.cflags)) {
748 cflags = invoker.cflags
749 }
750 if (defined(invoker.cflags_c)) {
751 cflags_c = invoker.cflags_c
752 }
753 if (defined(invoker.cflags_cc)) {
754 cflags_cc = invoker.cflags_cc
755 }
756 if (defined(invoker.cflags_objc)) {
757 cflags_objc = invoker.cflags_objc
758 }
759 if (defined(invoker.cflags_objcc)) {
760 cflags_objcc = invoker.cflags_objcc
761 }
762 if (defined(invoker.check_includes)) {
763 check_includes = invoker.check_includes
764 }
765 if (defined(invoker.data)) {
766 data = invoker.data
767 }
768 if (defined(invoker.data_deps)) {
769 data_deps = invoker.data_deps
770 }
771 if (defined(invoker.datadeps)) {
772 datadeps = invoker.datadeps
773 }
774 if (defined(invoker.defines)) {
775 defines = invoker.defines
776 }
777 if (defined(invoker.deps)) {
778 deps = invoker.deps
779 }
780 if (defined(invoker.direct_dependent_configs)) {
781 direct_dependent_configs = invoker.direct_dependent_configs
782 }
783 if (defined(invoker.forward_dependent_configs_from)) {
784 forward_dependent_configs_from = invoker.forward_dependent_configs_from
785 }
786 if (defined(invoker.include_dirs)) {
787 include_dirs = invoker.include_dirs
788 }
789 if (defined(invoker.ldflags)) {
790 ldflags = invoker.ldflags
791 }
792 if (defined(invoker.lib_dirs)) {
793 lib_dirs = invoker.lib_dirs
794 }
795 if (defined(invoker.libs)) {
796 libs = invoker.libs
797 }
798 if (defined(invoker.output_extension)) {
799 output_extension = invoker.output_extension
800 }
801 if (defined(invoker.output_name)) {
802 output_name = invoker.output_name
803 }
804 if (defined(invoker.public)) {
805 public = invoker.public
806 }
807 if (defined(invoker.public_configs)) {
808 public_configs = invoker.public_configs
809 }
810 if (defined(invoker.public_deps)) {
811 public_deps = invoker.public_deps
812 }
813 if (defined(invoker.sources)) {
814 sources = invoker.sources
815 }
816 if (defined(invoker.visibility)) {
817 visibility = invoker.visibility
818 }
819 }
820 } else {
821 executable(target_name) {
822 # See above.
823 configs = [] # Prevent list overwriting warning.
824 configs = invoker.configs
825
826 # See above call.
827 set_sources_assignment_filter([])
828
829 testonly = true
830
831 if (defined(invoker.all_dependent_configs)) {
832 all_dependent_configs = invoker.all_dependent_configs
833 }
834 if (defined(invoker.allow_circular_includes_from)) {
835 allow_circular_includes_from = invoker.allow_circular_includes_from
836 }
837 if (defined(invoker.cflags)) {
838 cflags = invoker.cflags
839 }
840 if (defined(invoker.cflags_c)) {
841 cflags_c = invoker.cflags_c
842 }
843 if (defined(invoker.cflags_cc)) {
844 cflags_cc = invoker.cflags_cc
845 }
846 if (defined(invoker.cflags_objc)) {
847 cflags_objc = invoker.cflags_objc
848 }
849 if (defined(invoker.cflags_objcc)) {
850 cflags_objcc = invoker.cflags_objcc
851 }
852 if (defined(invoker.check_includes)) {
853 check_includes = invoker.check_includes
854 }
855 if (defined(invoker.data)) {
856 data = invoker.data
857 }
858 if (defined(invoker.data_deps)) {
859 data_deps = invoker.data_deps
860 }
861 if (defined(invoker.datadeps)) {
862 datadeps = invoker.datadeps
863 }
864 if (defined(invoker.defines)) {
865 defines = invoker.defines
866 }
867
868 # All shared libraries must have the sanitizer deps to properly link in
869 # asan mode (this target will be empty in other cases).
870 if (defined(invoker.deps)) {
871 deps = invoker.deps + [ "//build/config/sanitizers:deps" ]
872 } else {
873 deps = [
874 "//build/config/sanitizers:deps",
875 ]
876 }
877 if (defined(invoker.direct_dependent_configs)) {
878 direct_dependent_configs = invoker.direct_dependent_configs
879 }
880 if (defined(invoker.forward_dependent_configs_from)) {
881 forward_dependent_configs_from = invoker.forward_dependent_configs_from
882 }
883 if (defined(invoker.include_dirs)) {
884 include_dirs = invoker.include_dirs
885 }
886 if (defined(invoker.ldflags)) {
887 ldflags = invoker.ldflags
888 }
889 if (defined(invoker.lib_dirs)) {
890 lib_dirs = invoker.lib_dirs
891 }
892 if (defined(invoker.libs)) {
893 libs = invoker.libs
894 }
895 if (defined(invoker.output_extension)) {
896 output_extension = invoker.output_extension
897 }
898 if (defined(invoker.output_name)) {
899 output_name = invoker.output_name
900 }
901 if (defined(invoker.public)) {
902 public = invoker.public
903 }
904 if (defined(invoker.public_configs)) {
905 public_configs = invoker.public_configs
906 }
907 if (defined(invoker.public_deps)) {
908 public_deps = invoker.public_deps
909 }
910 if (defined(invoker.sources)) {
911 sources = invoker.sources
912 }
913 if (defined(invoker.visibility)) {
914 visibility = invoker.visibility
915 }
916 }
917 }
918 }
OLDNEW
« no previous file with comments | « breakpad/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698