Merge changes from topic "mkboot"

* changes:
  prebuilt_etc is OutputFileProducer
  Revert "`data` dependency of java_test_host can be arch-specific"
This commit is contained in:
Treehugger Robot 2021-02-16 23:27:32 +00:00 committed by Gerrit Code Review
commit b913011777
2 changed files with 14 additions and 1 deletions

View File

@ -28,6 +28,8 @@ package etc
// various `prebuilt_*` mutators. // various `prebuilt_*` mutators.
import ( import (
"fmt"
"github.com/google/blueprint/proptools" "github.com/google/blueprint/proptools"
"android/soong/android" "android/soong/android"
@ -208,6 +210,17 @@ func (p *PrebuiltEtc) OutputFile() android.OutputPath {
return p.outputFilePath return p.outputFilePath
} }
var _ android.OutputFileProducer = (*PrebuiltEtc)(nil)
func (p *PrebuiltEtc) OutputFiles(tag string) (android.Paths, error) {
switch tag {
case "":
return android.Paths{p.outputFilePath}, nil
default:
return nil, fmt.Errorf("unsupported module reference tag %q", tag)
}
}
func (p *PrebuiltEtc) SubDir() string { func (p *PrebuiltEtc) SubDir() string {
if subDir := proptools.String(p.properties.Sub_dir); subDir != "" { if subDir := proptools.String(p.properties.Sub_dir); subDir != "" {
return subDir return subDir

View File

@ -2432,7 +2432,7 @@ type testProperties struct {
// list of files or filegroup modules that provide data that should be installed alongside // list of files or filegroup modules that provide data that should be installed alongside
// the test // the test
Data []string `android:"path,arch_variant"` Data []string `android:"path"`
// Flag to indicate whether or not to create test config automatically. If AndroidTest.xml // Flag to indicate whether or not to create test config automatically. If AndroidTest.xml
// doesn't exist next to the Android.bp, this attribute doesn't need to be set to true // doesn't exist next to the Android.bp, this attribute doesn't need to be set to true