What's the purpose of the TestStarted-XXX and TestFinished-XXX files?

The test traces directory tends to accumulate thousands and thousands of TestStarted-XXX and TestFinished-XXX files. What purpose do they serve?

I assume it’s for trying to figure out why something went wrong. If you have a TestStarted-123 without a corresponding TestFinished-123, then you can know that a test crashes and by looking inside the file, you can see which test and what the command was.

If that’s the case, then wouldn’t it be cleaner to delete the TestStarted file when the test finishes rather than writing a second file? Then you can simply search for TestStarted files to see the ones that didn’t finish successfully without the noise of thousands of others that did.

I suppose it’s also possible that some other process is looking at these files in order to collect statistics. Is there such a beast and is it valuable?

Adrian.

I would be happy to see these files go away if no one is using them...

I don't think anyone is relying on these. We should just stop creating
them altogether.

We are using the *.log files to track test results over time, but we
don't need these files there. You can detect crashing tests by the
fact that the log files don't have a "TestResult-" (Success, Failure,
Error, ...) prefix. We have a script for doing that here
<https://android.googlesource.com/platform/external/lldb-utils/+/lldb-master-dev/buildbotScripts/logParser/doParse.py&gt;,
but it's very specific to our buildbot setup, so it may not be very
useful to you...

Thanks. I have a patch out that removes the files that I’ll probably submit today.