I'm developing a custom device targeting Android P, and have added custom system service which uses some hidden APIs. The service then will be used by the android application which is not part of the AOSP source tree.
I have added some unit and instrumentation tests for my service and now want to integrate them into my CI pipeline. What would be the best approach - extend CTS? But it's only my service and doesn't expose any public API. VTS? But afaik VTS is only about testing HALs and kernels. Is there a way just to declare custom test suite to be able to run it with Trade Federation/Atest harness like "tradefed.sh run my_test_suite"?
Finally I found what I was looking for - there is a good explanation of how to add custom TradeFed test suite tag (based on Android P sources) - [aosp]/tools/tradefederation/core/tests/res/config/suite/suite.md
Basically you have to create a new config file like this (so far I tried to add it to TradeFederation folder as written in the doc):
<?xml version="1.0" encoding="utf-8"?>
<configuration description="My test suite config">
<test class="com.android.tradefed.testtype.suite.TfSuiteRunner">
<option name="run-suite-tag" value="my-test-suite" />
</test>
</configuration>
And then use it in your test config files like this:
<option name="test-suite-tag" value="my-test-suite" />
And then you can execute your suite like this:
make tradefed-all
make YourTestModule
tradefed.sh run template/local --template:map test=suite/my-test-suite