Add some end to end tests to the CTS test suite

There are a bunch of end to end tests in test:integrationtests
(android_integrationtest.cc, cmdline_integrationtest.cc,
ftrace_integrationtest.cc, traced_integrationtest.cc).

These tests are linked in perfetto_integrationtests, which is run in CI
on a couple of devices.

I think the intention in the code base was for these tests to be
included in CtsPerfettoTestCases. All devices have to pass CTS, so that
gives us a better guarantee that perfetto is working.

Unfortunately, our build files did not include these tests correctly
into the CtsPerfettoTestCases.

Before this commit

GN:

```
//test/cts:
static_library("perfetto_cts_deps") {
  deps = [ "test:integrationtests" ],
}

//test:
source_set("integrationtests") {
  sources = [
    "android_integrationtest.cc",
    "cmdline_integrationtest.cc",
    "ftrace_integrationtest.cc",
    "traced_integrationtest.cc",
  ]
}
```

BP:

```
//test/cts/Android.bp (NOT autogenerated)
cc_test {
  name: "CtsPerfettoTestCases"
  static_libs: ["perfetto_cts_deps"]
}
//Android.bp (autogenerated from GN)
cc_library_static {
  name: "perfetto_cts_deps"
  srcs: [ "perfetto_test_integrationtests" ]
}
filegroup {
  name: "perfetto_test_integrationtests"
  srcs: [
    "android_integrationtest.cc",
    "cmdline_integrationtest.cc",
    "ftrace_integrationtest.cc",
    "traced_integrationtest.cc",
  ]
}
```

The files in the filegroup `perfetto_test_integrationtests` were
included into the cc_library_static `perfetto_cts_deps`. When
CtsPerfettoTestCases links `perfetto_cts_deps`, it doesn't include all
the objects, it includes only the one that strictly needs and it
excludes the one that only register initializers (i.e. there's no
--whole-archive).

This commit fixes the problem by listing the _integrationtest.cc
explicitly in `CtsPerfettoTestCases`.

In order to do that, this commit:
* Renames end_to_end_integrationtest_cts.cc to
  producer_to_consumer_integrationtest_cts.cc so that the name
  end_to_end can be reused later.
* Renames the source_set //test:integrationtests to
  perfetto_end_to_end_integrationtests, so that it can be exported to
  Android.bp (exported targets are not prefixed with their path).

Before this change CtsPerfettoTestCases was taking ~2 minutes and 30
seconds on my redfin. After this change CtsPerfettoTestCases is taking
2 minutex and 40 seconds, so this commit also updates the timeout in the
XML.

This is the diff between the old CTS test list and the new one:

```
 HeapprofdJavaCtsTest.
   DebuggableAppRuntime
   ProfileableAppRuntime
   ReleaseAppRuntime
   DebuggableAppRuntimeByPid
   DebuggableAppOom
   ProfileableAppOom
   ReleaseAppOom
   DebuggableAppOomNotSelected
 HeapprofdCtsTest.
   DebuggableAppRuntime
   DebuggableAppStartup
   ProfileableAppRuntime
   ProfileableAppStartup
   ReleaseAppRuntime
   ReleaseAppStartup
   NonProfileableAppRuntime
   NonProfileableAppStartup
   JavaHeapRuntime
   JavaHeapStartup
   ProfilePlatformProcess
 TracedPerfCtsTest.
   SystemWideDebuggableApp
   SystemWideProfileableApp
   SystemWideNonProfileableApp
   SystemWideReleaseApp
   ProfilePlatformProcess
 PerfettoDeviceFeatureTest.
   TestMaxCpusForAtraceChmod
 PerfettoCtsTest.
   TestProducerActivity
   TestProducerService
   TestProducerIsolatedService
+PerfettoAndroidIntegrationTest.
+  TestKmemActivity
+  TestBatteryTracing
+PerfettoCmdlineTest.
+  InvalidCases
+  Version
+  TxtConfig
+  SimpleConfig
+  DetachAndAttach
+  StartTracingTrigger
+  StopTracingTrigger
+  NoDataNoFileWithoutTrigger
+  StopTracingTriggerFromConfig
+  TriggerFromConfigStopsFileOpening
+  Query
+  CmdTriggerWithUploadFlag
+  TriggerCloneSnapshot
+  SaveForBugreport
+  SaveForBugreport_WriteIntoFile
+  Clone
+  UnavailableBugreportLeavesNoEmptyFiles
+  DISABLED_SaveForBugreport_Triggers
+PerfettoFtraceIntegrationTest.
+  TestFtraceProducer
+  TestFtraceFlush
+  KernelAddressSymbolization
+  ReportFtraceFailuresInStats
+PerfettoTracedIntegrationTest.
+  TestFakeProducer
+  VeryLargePackets
+  UnresponsiveProducer
+  DetachAndReattach
+  ReattachFailsAfterTimeout
+  TestProducerProvidedSMB
+  QueryServiceStateLargeResponse
+  TraceFilterLargePackets
```

Change-Id: Idcd04d6239f276b95abeca09ebb0891d5cf98a3f
diff --git a/Android.bp b/Android.bp
index 4265016..77b3dda 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1204,7 +1204,6 @@
         ":perfetto_src_ipc_perfetto_ipc",
         ":perfetto_src_kallsyms_kallsyms",
         ":perfetto_src_kernel_utils_syscall_table",
-        ":perfetto_src_perfetto_cmd_bugreport_path",
         ":perfetto_src_protozero_filtering_bytecode_common",
         ":perfetto_src_protozero_filtering_bytecode_generator",
         ":perfetto_src_protozero_filtering_bytecode_parser",
@@ -1238,12 +1237,11 @@
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
-        ":perfetto_test_integrationtests",
         ":perfetto_test_test_helper",
         "test/cts/device_feature_test_cts.cc",
-        "test/cts/end_to_end_integrationtest_cts.cc",
         "test/cts/heapprofd_java_test_cts.cc",
         "test/cts/heapprofd_test_cts.cc",
+        "test/cts/producer_to_consumer_integrationtest_cts.cc",
         "test/cts/traced_perf_test_cts.cc",
     ],
     static_libs: [
@@ -1705,6 +1703,17 @@
     },
 }
 
+// GN: //test:perfetto_end_to_end_integrationtests
+filegroup {
+    name: "perfetto_end_to_end_integrationtests",
+    srcs: [
+        "test/android_integrationtest.cc",
+        "test/cmdline_integrationtest.cc",
+        "test/ftrace_integrationtest.cc",
+        "test/traced_integrationtest.cc",
+    ],
+}
+
 // GN: //test:perfetto_gtest_logcat_printer
 cc_library_static {
     name: "perfetto_gtest_logcat_printer",
@@ -1870,6 +1879,7 @@
     name: "perfetto_integrationtests",
     srcs: [
         ":perfetto_base_default_platform",
+        ":perfetto_end_to_end_integrationtests",
         ":perfetto_include_perfetto_base_base",
         ":perfetto_include_perfetto_ext_base_base",
         ":perfetto_include_perfetto_ext_base_version",
@@ -2131,7 +2141,6 @@
         ":perfetto_src_tracing_test_client_api_integrationtests",
         ":perfetto_src_tracing_test_test_support",
         ":perfetto_src_tracing_test_tracing_integration_test",
-        ":perfetto_test_integrationtests",
         ":perfetto_test_test_helper",
     ],
     shared_libs: [
@@ -11530,17 +11539,6 @@
     ],
 }
 
-// GN: //test:integrationtests
-filegroup {
-    name: "perfetto_test_integrationtests",
-    srcs: [
-        "test/android_integrationtest.cc",
-        "test/cmdline_integrationtest.cc",
-        "test/ftrace_integrationtest.cc",
-        "test/traced_integrationtest.cc",
-    ],
-}
-
 // GN: //test/sanitizers:unittests
 filegroup {
     name: "perfetto_test_sanitizers_unittests",