From 33a1baef7a63fd5cc7c639d72188abc4cd8e2ef9 Mon Sep 17 00:00:00 2001 From: Chris Masone Date: Mon, 18 Nov 2013 14:35:09 -0800 Subject: [PATCH] Add passive_metrics USE flag to platform2 We want to be able to control the inclusion of the metrics_daemon, which passively gathers power stats and the like and sends them through the UMA pipeline iff the user has opted-in to metrics collection. CQ-DEPEND=CL:177244, CL:177291 BUG=None TEST=emerge platform2 with USE='-passive_metrics' on and off, with and without FEATURES=test Change-Id: Id6af84d3de585a156d8ebbcc23117df000de080d Reviewed-on: https://chromium-review.googlesource.com/177217 Reviewed-by: Chris Masone Tested-by: Chris Masone Commit-Queue: Chris Masone --- metrics/metrics.gyp | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/metrics/metrics.gyp b/metrics/metrics.gyp index b2644ba23..67e7c379d 100644 --- a/metrics/metrics.gyp +++ b/metrics/metrics.gyp @@ -52,11 +52,6 @@ 'metrics_daemon_main.cc', ] }, - { - 'target_name': 'metrics_daemon', - 'type': 'executable', - 'dependencies': ['libmetrics_daemon'], - }, { 'target_name': 'metrics_client', 'type': 'executable', @@ -67,6 +62,15 @@ }, ], 'conditions': [ + ['USE_passive_metrics == 1', { + 'targets': [ + { + 'target_name': 'metrics_daemon', + 'type': 'executable', + 'dependencies': ['libmetrics_daemon'], + }, + ], + }], ['USE_test == 1', { 'targets': [ { @@ -78,17 +82,6 @@ 'metrics_library_test.cc', ] }, - { - 'target_name': 'metrics_daemon_test', - 'type': 'executable', - 'dependencies': [ - 'libmetrics_daemon', - ], - 'includes': ['../common-mk/common_test.gypi'], - 'sources': [ - 'metrics_daemon_test.cc', - ] - }, { 'target_name': 'counter_test', 'type': 'executable', @@ -109,5 +102,20 @@ }, ], }], + ['USE_passive_metrics == 1 and USE_test == 1', { + 'targets': [ + { + 'target_name': 'metrics_daemon_test', + 'type': 'executable', + 'dependencies': [ + 'libmetrics_daemon', + ], + 'includes': ['../common-mk/common_test.gypi'], + 'sources': [ + 'metrics_daemon_test.cc', + ] + }, + ], + }], ], }