Generate tradefed config for rust device tests.

* The RustBinaryTest runner and device test config template
  are derived from GTest. Device tests are pushed to /data/local/tmp.

Bug: 140938178
Test: make unicode-xid projects; run atest
Change-Id: Idb4cab7872b48c6e25bc59b85aa6d9dece4383ec
This commit is contained in:
Chih-Hung Hsieh
2019-11-22 20:22:35 -08:00
committed by Chih-hung Hsieh
parent 01178ed7d1
commit ede57ae812
5 changed files with 26 additions and 12 deletions

View File

@@ -90,11 +90,7 @@ func (binary *binaryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Andr
func (test *testDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
test.binaryDecorator.AndroidMk(ctx, ret)
ret.Class = "NATIVE_TESTS"
stem := String(test.baseCompiler.Properties.Stem)
if stem != "" && !strings.HasSuffix(ctx.Name(), "_"+stem) {
// Avoid repeated suffix in the module name.
ret.SubName = "_" + stem
}
ret.SubName = test.getMutatedModuleSubName(ctx.Name())
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
if len(test.Properties.Test_suites) > 0 {
fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE :=",