diff options
| author | 2021-02-04 10:10:16 -0800 | |
|---|---|---|
| committer | 2021-02-04 10:10:16 -0800 | |
| commit | 8908b37a14ebcf3da0acdc3a4535ff7d2ef6b691 (patch) | |
| tree | abf04a40dd005200f528aab87f60ea508c55fe2d | |
| parent | 53b2427fc9a3e256d8611ba27f399fe828797468 (diff) | |
Switch cc_test host_supported: true to unit tests
Test: presubmit
Bug: 179092189
Change-Id: Ic5c3ca6de44732f6299ad9a35d1aaef622f3ff7f
| -rw-r--r-- | cc/test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cc/test.go b/cc/test.go index 17ac534f8..68e05bacf 100644 --- a/cc/test.go +++ b/cc/test.go @@ -232,7 +232,6 @@ func TestPerSrcMutator(mctx android.BottomUpMutatorContext) { type testDecorator struct { Properties TestProperties linker *baseLinker - hod android.HostOrDeviceSupported } func (test *testDecorator) gtest() bool { @@ -432,8 +431,7 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) { ctx.PropertyErrorf("no_named_install_directory", "Module install directory may only be disabled if relative_install_path is set") } - // TODO(179092189): Clean up to use Ctx.Host() when generalizing to cc_test - if test.testDecorator.hod == android.HostSupported && test.gtest() && test.Properties.Test_options.Unit_test == nil { + if ctx.Host() && test.gtest() && test.Properties.Test_options.Unit_test == nil { test.Properties.Test_options.Unit_test = proptools.BoolPtr(true) } test.binaryDecorator.baseInstaller.install(ctx, file) @@ -447,7 +445,6 @@ func NewTest(hod android.HostOrDeviceSupported) *Module { test := &testBinary{ testDecorator: testDecorator{ linker: binary.baseLinker, - hod: hod, }, binaryDecorator: binary, baseCompiler: NewBaseCompiler(), |