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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 6354aec651dd0e4039f12511cb3e2aa8d927b984..c8e8d9ec7d514af8512d7e0e679b268e748cc0c7 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -570,8 +570,8 @@ template("component") {
# TEST SETUP
# ==============================================================================
-# Define a test as an executable. In the future, we'll set "test only" flags
-# on this (when such flags exist) and do something different for Android.
+# Define a test as an executable with the "testonly" flag set. In the future,
+# this will need to be enhanced for Android.
template("test") {
executable(target_name) {
# Configs will always be defined since we set_defaults for a component
@@ -580,6 +580,8 @@ template("test") {
configs = [] # Prevent list overwriting warning.
configs = invoker.configs
+ testonly = true
+
# See above call.
set_sources_assignment_filter([])
« 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