perfetto: add code for building/enabling cts tests

Bug: 170524267
Change-Id: I9b910def246f1fa3884f22f40bfc205ad8de2276
diff --git a/Android.bp.extras b/Android.bp.extras
index bedc0e9..b882eaa 100644
--- a/Android.bp.extras
+++ b/Android.bp.extras
@@ -1,10 +1,7 @@
 // These targets are appended to the autogenerated Android.bp by tools/gen_android_bp.
 // TODO(lalitm): find a better way to do this sharing.
-
-// TODO(lalitm): uncomment these when the CTS tests are to be enabled.
-/*
-cc_test {
-  name: "CtsPerfettoTestCases",
+cc_library_static {
+  name: "perfetto_cts_deps",
   srcs: [
     "src/base/android_task_runner.cc",
     "src/base/test/test_task_runner.cc",
@@ -17,59 +14,39 @@
     "src/traced/probes/probes_producer.cc",
     "test/fake_consumer.cc",
     "test/end_to_end_integrationtest.cc",
-    "test/end_to_end_integrationtest_cts.cc",
   ],
-  static_libs: [
-    "libgmock",
-    "libgtest",
-    "libgtest_main",
-    "perfetto_src_tracing_ipc",
+  export_include_dirs: [
+    ".",
   ],
   shared_libs: [
-    "libandroid",
-    "liblog",
     "libprotobuf-cpp-lite",
   ],
-  test_suites: [
-    "cts",
-    "vts",
-    "general-tests",
+  static_libs: [
+    "perfetto_src_tracing_ipc",
+    "libgtest_prod",
   ],
-  compile_multilib: "both",
-  multilib: {
-    lib32: {
-        suffix: "32",
-    },
-    lib64: {
-        suffix: "64",
-    },
-  },
   cflags: [
     "-DPERFETTO_BUILD_WITH_ANDROID",
   ],
 }
 
-cc_library_shared {
-  name: "libperfettocts_jni",
+cc_library_static {
+  name: "perfetto_cts_jni_deps",
   srcs: [
     "src/base/android_task_runner.cc",
     "src/base/test/test_task_runner.cc",
     "test/fake_producer.cc",
-    "test/cts/producer/jni/fake_producer_jni.cc",
-  ],
-  static_libs: [
-    "libprotobuf-cpp-lite",
-    "perfetto_src_tracing_ipc",
   ],
   shared_libs: [
-    "libandroid",
-    "liblog",
-    "libnativehelper_compat_libc++",
+    "libprotobuf-cpp-lite",
   ],
-  compile_multilib: "both",
-  stl: "libc++_static",
+  export_include_dirs: [
+    ".",
+  ],
+  static_libs: [
+    "perfetto_src_tracing_ipc",
+  ],
   cflags: [
     "-DPERFETTO_BUILD_WITH_ANDROID",
   ],
 }
-*/