diff options
| author | Jaewoong Jung <jungjw@google.com> | 2019-09-11 10:25:18 -0700 |
|---|---|---|
| committer | Rashed Abdel-Tawab <rashed@linux.com> | 2019-10-06 07:14:47 -0700 |
| commit | ab4d3e54a8f9386a984aa3193e563e4b4fd6f562 (patch) | |
| tree | 1ec68a35f38da67480d96f57f02391ee6ce51e02 /android | |
| parent | 88d8316da64e63a7d50dd006eb0807d34ef28f16 (diff) | |
| download | build_soong-ab4d3e54a8f9386a984aa3193e563e4b4fd6f562.tar.gz build_soong-ab4d3e54a8f9386a984aa3193e563e4b4fd6f562.tar.bz2 build_soong-ab4d3e54a8f9386a984aa3193e563e4b4fd6f562.zip | |
Fix android_test install path.
Test: m nothing + diff soong mk and ninja files.
Bug: 140795853
Change-Id: I3667eac951dea7e447cf73219ff89199fca9ed63
Diffstat (limited to 'android')
| -rw-r--r-- | android/module.go | 10 | ||||
| -rw-r--r-- | android/paths.go | 3 | ||||
| -rw-r--r-- | android/paths_test.go | 5 |
3 files changed, 18 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index 6a796227..495efbe1 100644 --- a/android/module.go +++ b/android/module.go @@ -129,6 +129,7 @@ type ModuleContext interface { AddMissingDependencies(deps []string) InstallInData() bool + InstallInTestcases() bool InstallInSanitizerDir() bool InstallInRecovery() bool @@ -185,6 +186,7 @@ type Module interface { Enabled() bool Target() Target InstallInData() bool + InstallInTestcases() bool InstallInSanitizerDir() bool InstallInRecovery() bool SkipInstall() @@ -656,6 +658,10 @@ func (p *ModuleBase) InstallInData() bool { return false } +func (p *ModuleBase) InstallInTestcases() bool { + return false +} + func (p *ModuleBase) InstallInSanitizerDir() bool { return false } @@ -1252,6 +1258,10 @@ func (a *androidModuleContext) InstallInData() bool { return a.module.InstallInData() } +func (a *androidModuleContext) InstallInTestcases() bool { + return a.module.InstallInTestcases() +} + func (a *androidModuleContext) InstallInSanitizerDir() bool { return a.module.InstallInSanitizerDir() } diff --git a/android/paths.go b/android/paths.go index 8d0573d5..8583daa5 100644 --- a/android/paths.go +++ b/android/paths.go @@ -46,6 +46,7 @@ type ModuleInstallPathContext interface { androidBaseContext InstallInData() bool + InstallInTestcases() bool InstallInSanitizerDir() bool InstallInRecovery() bool } @@ -1167,6 +1168,8 @@ func modulePartition(ctx ModuleInstallPathContext) string { var partition string if ctx.InstallInData() { partition = "data" + } else if ctx.InstallInTestcases() { + partition = "testcases" } else if ctx.InstallInRecovery() { // the layout of recovery partion is the same as that of system partition partition = "recovery/root/system" diff --git a/android/paths_test.go b/android/paths_test.go index b52d7133..c956a795 100644 --- a/android/paths_test.go +++ b/android/paths_test.go @@ -203,6 +203,7 @@ type moduleInstallPathContextImpl struct { androidBaseContextImpl inData bool + inTestcases bool inSanitizerDir bool inRecovery bool } @@ -221,6 +222,10 @@ func (m moduleInstallPathContextImpl) InstallInData() bool { return m.inData } +func (m moduleInstallPathContextImpl) InstallInTestcases() bool { + return m.inTestcases +} + func (m moduleInstallPathContextImpl) InstallInSanitizerDir() bool { return m.inSanitizerDir } |
