metricsd: move timer_mock.h and metrics_library_mock.h into include/metrics/

Move metrics_library_mock.h and timer_mock.h into the include/metrics/
folder since some source files in shill need to include these header files.

Adjust the include paths in metricsd source files accordingly, and add
the -frtti flag to the libmetrics target so that classes including
these mock headers can determine the type information of the underlying
class being mocked at run-time.

BUG: 22956441
Change-Id: I19820c0d3097c9c4c2b93730d1988ccec563db23
TEST: "mma" in metricsd folder succeeds.
This commit is contained in:
Samuel Tan 2015-09-23 14:39:35 -07:00
parent e4975da333
commit 28a78b7210
6 changed files with 5 additions and 4 deletions

View file

@ -88,6 +88,7 @@ LOCAL_CFLAGS := $(metrics_CFLAGS)
LOCAL_CLANG := true
LOCAL_CPP_EXTENSION := $(metrics_cpp_extension)
LOCAL_CPPFLAGS := $(metrics_CPPFLAGS)
LOCAL_RTTI_FLAG := -frtti
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_SHARED_LIBRARIES := $(metrics_shared_libraries)
LOCAL_SRC_FILES := $(libmetrics_sources)

View file

@ -30,7 +30,7 @@
#include "constants.h"
#include "metrics_daemon.h"
#include "metrics_library_mock.h"
#include "metrics/metrics_library_mock.h"
#include "persistent_integer_mock.h"
using base::FilePath;

View file

@ -20,9 +20,9 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "metrics/metrics_library_mock.h"
#include "metrics/timer.h"
#include "metrics_library_mock.h"
#include "timer_mock.h"
#include "metrics/timer_mock.h"
using ::testing::_;
using ::testing::Return;

View file

@ -23,7 +23,7 @@
#include <base/sys_info.h>
#include "constants.h"
#include "metrics_library_mock.h"
#include "metrics/metrics_library_mock.h"
#include "persistent_integer.h"
#include "serialization/metric_sample.h"
#include "uploader/metrics_log.h"