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

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

Issue 532423003: Add the "testonly" flag to the GN test target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pullgn
Patch Set: android 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 | « no previous file | 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (defined(invoker.sources)) { sources = invoker.sources } 563 if (defined(invoker.sources)) { sources = invoker.sources }
564 if (defined(invoker.visibility)) { visibility = invoker.visibility } 564 if (defined(invoker.visibility)) { visibility = invoker.visibility }
565 } 565 }
566 } 566 }
567 } 567 }
568 568
569 # ============================================================================== 569 # ==============================================================================
570 # TEST SETUP 570 # TEST SETUP
571 # ============================================================================== 571 # ==============================================================================
572 572
573 # Define a test as an executable. In the future, we'll set "test only" flags 573 # Define a test as an executable with the "testonly" flag set. In the future,
574 # on this (when such flags exist) and do something different for Android. 574 # this will need to be enhanced for Android.
575 template("test") { 575 template("test") {
576 executable(target_name) { 576 executable(target_name) {
577 # Configs will always be defined since we set_defaults for a component 577 # Configs will always be defined since we set_defaults for a component
578 # above. We want to use those rather than whatever came with the nested 578 # above. We want to use those rather than whatever came with the nested
579 # shared/static library inside the component. 579 # shared/static library inside the component.
580 configs = [] # Prevent list overwriting warning. 580 configs = [] # Prevent list overwriting warning.
581 configs = invoker.configs 581 configs = invoker.configs
582 582
583 testonly = true
584
583 # See above call. 585 # See above call.
584 set_sources_assignment_filter([]) 586 set_sources_assignment_filter([])
585 587
586 if (defined(invoker.all_dependent_configs)) { all_dependent_configs = invoke r.all_dependent_configs } 588 if (defined(invoker.all_dependent_configs)) { all_dependent_configs = invoke r.all_dependent_configs }
587 if (defined(invoker.cflags)) { cflags = invoker.cflags } 589 if (defined(invoker.cflags)) { cflags = invoker.cflags }
588 if (defined(invoker.cflags_c)) { cflags_c = invoker.cflags_c } 590 if (defined(invoker.cflags_c)) { cflags_c = invoker.cflags_c }
589 if (defined(invoker.cflags_cc)) { cflags_cc = invoker.cflags_cc } 591 if (defined(invoker.cflags_cc)) { cflags_cc = invoker.cflags_cc }
590 if (defined(invoker.cflags_objc)) { cflags_objc = invoker.cflags_objc } 592 if (defined(invoker.cflags_objc)) { cflags_objc = invoker.cflags_objc }
591 if (defined(invoker.cflags_objcc)) { cflags_objcc = invoker.cflags_objcc } 593 if (defined(invoker.cflags_objcc)) { cflags_objcc = invoker.cflags_objcc }
592 if (defined(invoker.data)) { data = invoker.data } 594 if (defined(invoker.data)) { data = invoker.data }
593 if (defined(invoker.datadeps)) { datadeps = invoker.datadeps } 595 if (defined(invoker.datadeps)) { datadeps = invoker.datadeps }
594 if (defined(invoker.defines)) { defines = invoker.defines } 596 if (defined(invoker.defines)) { defines = invoker.defines }
595 if (defined(invoker.deps)) { deps = invoker.deps } 597 if (defined(invoker.deps)) { deps = invoker.deps }
596 if (defined(invoker.direct_dependent_configs)) { direct_dependent_configs = invoker.direct_dependent_configs } 598 if (defined(invoker.direct_dependent_configs)) { direct_dependent_configs = invoker.direct_dependent_configs }
597 if (defined(invoker.forward_dependent_configs_from)) { forward_dependent_con figs_from = invoker.forward_dependent_configs_from } 599 if (defined(invoker.forward_dependent_configs_from)) { forward_dependent_con figs_from = invoker.forward_dependent_configs_from }
598 if (defined(invoker.include_dirs)) { include_dirs = invoker.include_dirs } 600 if (defined(invoker.include_dirs)) { include_dirs = invoker.include_dirs }
599 if (defined(invoker.ldflags)) { ldflags = invoker.ldflags } 601 if (defined(invoker.ldflags)) { ldflags = invoker.ldflags }
600 if (defined(invoker.lib_dirs)) { lib_dirs = invoker.lib_dirs } 602 if (defined(invoker.lib_dirs)) { lib_dirs = invoker.lib_dirs }
601 if (defined(invoker.libs)) { libs = invoker.libs } 603 if (defined(invoker.libs)) { libs = invoker.libs }
602 if (defined(invoker.output_extension)) { output_extension = invoker.output_e xtension } 604 if (defined(invoker.output_extension)) { output_extension = invoker.output_e xtension }
603 if (defined(invoker.output_name)) { output_name = invoker.output_name } 605 if (defined(invoker.output_name)) { output_name = invoker.output_name }
604 if (defined(invoker.public)) { public = invoker.public } 606 if (defined(invoker.public)) { public = invoker.public }
605 if (defined(invoker.sources)) { sources = invoker.sources } 607 if (defined(invoker.sources)) { sources = invoker.sources }
606 if (defined(invoker.visibility)) { visibility = invoker.visibility } 608 if (defined(invoker.visibility)) { visibility = invoker.visibility }
607 } 609 }
608 } 610 }
OLDNEW
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698