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 <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Masone <cmasone@chromium.org>
This commit is contained in:
Chris Masone 2013-11-18 14:35:09 -08:00 committed by chrome-internal-fetch
parent e8fd968af0
commit 33a1baef7a
1 changed files with 24 additions and 16 deletions

View File

@ -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',
]
},
],
}],
],
}