1 This folder contains the CTS tests for the Perfetto library. 2 3 # Background 4 For information about what CTS is, please go to 5 https://source.android.com/compatibility/cts/ where you will find information 6 on the purpose of CTS and how to run these tests. 7 8 # Structure of folder 9 There are two targets in this folder: a mock producer app and a GTest 10 suite. 11 12 The GTest suite is both the consumer of data as well as the driver 13 the actual tests we wish to run. This target drives the tracing system by 14 requesting tracing to start/stop and ensures the data it receives is correct. 15 This mimics the role of real consumers acting as the driver for tracing on 16 device. This suite is compiled and pushed to device and subsequently run 17 using a shell account which gives us permissions to access the perfetto 18 consumer socket. 19 20 The mock producer is an Android app with a thin Java wrapping around the C++ 21 library interfaced using JNI. The purpose of this target is to ensure that the 22 TraceProto received from the consumer is valid and and then push some fake data. 23 This ensures that any arbitary app can push data to the Perfetto socket which 24 can then be decoded by the GTest consumer. This app is simply installed before 25 the GTest suite is run. 26 27 # Notes 28 The AndroidTest.xml file which is associated with these tests can be found 29 in $ANDROID/cts/tests/perfetto. This is to allow for other users of CTS to 30 be aware that Perfetto has CTS tests. 31 32 The code is located inside the Perfetto repository as we anticipate fast 33 development on Perfetto and moreover, we wish to retain the ability to 34 run these tests independently of the Android tree if required.