Merge changes I5057c2cc,I83ac66c6 into main
* changes:
Fixes for missing rules in m --soong-only
Install intermediate file in testcases
diff --git a/android/module_context.go b/android/module_context.go
index a3dad93..d3c5370 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -639,6 +639,9 @@
func (m *moduleContext) installFile(installPath InstallPath, name string, srcPath Path, deps []InstallPath,
executable bool, hooks bool, checkbuild bool, extraZip *extraFilesZip) InstallPath {
+ if _, ok := srcPath.(InstallPath); ok {
+ m.ModuleErrorf("Src path cannot be another installed file. Please use a path from source or intermediates instead.")
+ }
fullInstallPath := installPath.Join(m, name)
if hooks {
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 9dcbec1..63d0791 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -1163,6 +1163,10 @@
ctx.Phony("product_config_to_bp", generatedBp)
+ if !ctx.Config().KatiEnabled() {
+ // Cannot diff since the kati packaging rules will not be created.
+ return
+ }
var diffTestFiles []android.Path
for _, partitionType := range partitions.types() {
diffTestFile := f.createFileListDiffTest(ctx, partitionType, partitions.nameForType(partitionType))
diff --git a/golang/golang.go b/golang/golang.go
index 3422f8b..9e0744a 100644
--- a/golang/golang.go
+++ b/golang/golang.go
@@ -101,7 +101,7 @@
// Modules in an unexported namespace have no install rule, only add modules in the exported namespaces
// to the blueprint_tools phony rules.
- if (!ctx.Config().KatiEnabled() || g.ExportedToMake()) && !usedByBootstrap(ctx.ModuleName()) {
+ if g.ExportedToMake() && !usedByBootstrap(ctx.ModuleName()) {
// Don't add the installed file of bootstrap tools to the deps of `blueprint_tools`.
// The install command line will differ from what was used during bootstrap,
// which will cause ninja to rebuild the module on the next run,
diff --git a/java/java.go b/java/java.go
index cd97ce0..900f0e3 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1888,8 +1888,8 @@
dataPath := android.DataPath{SrcPath: data}
ctx.InstallTestData(pathInTestCases, []android.DataPath{dataPath})
}
- if j.installFile != nil {
- ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.installFile)
+ if j.outputFile != nil {
+ ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.outputFile)
}
}
}