commit | 5567443fceff3fe08c16c3241cdd7ec96e3c4297 | [log] [tgz] |
---|---|---|
author | Daniele Di Proietto <ddiproietto@google.com> | Fri Jun 02 10:46:53 2023 +0000 |
committer | Daniele Di Proietto <ddiproietto@google.com> | Tue Jun 06 16:24:10 2023 +0000 |
tree | 99e773d80148300bbff86c5f988437b740babf16 | |
parent | 53002b30d2f05f6c267012ce2abf3c5fbd4e9e35 [diff] |
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
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.