Split bugreport() into its own file and added unit tests.
bugreport() will be soon refactored to track progress, which will
require more comprehensive unit tests.
As such, it's better to move it to its own files, which in turn also
requires moving send_shell_command() and usage() to commandline.h.
Fixes: 30100363
Bug: 30268737
Change-Id: I3cdf114a0b5547293320042ff0749a60886440b0
(cherry picked from commit 78e0963e4bce9cc9f0bbf0b686004ba15b1e3929)
diff --git a/adb/Android.mk b/adb/Android.mk
index 3512323..73b8121 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -183,6 +183,9 @@
LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
LOCAL_SRC_FILES := \
$(LIBADB_TEST_SRCS) \
+ adb_client.cpp \
+ bugreport.cpp \
+ bugreport_test.cpp \
services.cpp \
shell_service_protocol.cpp \
shell_service_protocol_test.cpp \
@@ -198,6 +201,7 @@
libcrypto \
libcutils \
libdiagnose_usb \
+ libgmock_host \
# Set entrypoint to wmain from sysdeps_win32.cpp instead of main
LOCAL_LDFLAGS_windows := -municode
@@ -226,6 +230,7 @@
LOCAL_SRC_FILES := \
adb_client.cpp \
+ bugreport.cpp \
client/main.cpp \
console.cpp \
commandline.cpp \