Use correct install paths in generated Android.mk
Extract Soong's install path and put it in the generated Android.mk file so that tests get installed in the correct place. Change-Id: Id4726855c5677855406de20773a5da533bdd4cea
This commit is contained in:
@@ -17,6 +17,7 @@ package cc
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"android/soong/common"
|
||||
@@ -105,5 +106,17 @@ func (binary *binaryLinker) AndroidMk(ret *common.AndroidMkData) {
|
||||
}
|
||||
|
||||
func (test *testLinker) AndroidMk(ret *common.AndroidMkData) {
|
||||
ret.Disabled = true
|
||||
test.binaryLinker.AndroidMk(ret)
|
||||
if Bool(test.Properties.Test_per_src) {
|
||||
ret.SubName = test.binaryLinker.Properties.Stem
|
||||
}
|
||||
}
|
||||
|
||||
func (installer *baseInstaller) AndroidMk(ret *common.AndroidMkData) {
|
||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile common.Path) error {
|
||||
path := installer.path.RelPathString()
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Dir(path))
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+filepath.Base(path))
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user