Merge "Add a tracking bug for non ext4 FS type support" into main
diff --git a/android/packaging.go b/android/packaging.go
index 3c64d56..d615871 100644
--- a/android/packaging.go
+++ b/android/packaging.go
@@ -65,30 +65,32 @@
}
type packagingSpecGob struct {
- RelPathInPackage string
- SrcPath Path
- SymlinkTarget string
- Executable bool
- Partition string
- SkipInstall bool
- AconfigPaths *Paths
- ArchType ArchType
- Overrides *[]string
- Owner string
+ RelPathInPackage string
+ SrcPath Path
+ SymlinkTarget string
+ Executable bool
+ EffectiveLicenseFiles *Paths
+ Partition string
+ SkipInstall bool
+ AconfigPaths *Paths
+ ArchType ArchType
+ Overrides *[]string
+ Owner string
}
func (p *PackagingSpec) ToGob() *packagingSpecGob {
return &packagingSpecGob{
- RelPathInPackage: p.relPathInPackage,
- SrcPath: p.srcPath,
- SymlinkTarget: p.symlinkTarget,
- Executable: p.executable,
- Partition: p.partition,
- SkipInstall: p.skipInstall,
- AconfigPaths: p.aconfigPaths,
- ArchType: p.archType,
- Overrides: p.overrides,
- Owner: p.owner,
+ RelPathInPackage: p.relPathInPackage,
+ SrcPath: p.srcPath,
+ SymlinkTarget: p.symlinkTarget,
+ Executable: p.executable,
+ EffectiveLicenseFiles: p.effectiveLicenseFiles,
+ Partition: p.partition,
+ SkipInstall: p.skipInstall,
+ AconfigPaths: p.aconfigPaths,
+ ArchType: p.archType,
+ Overrides: p.overrides,
+ Owner: p.owner,
}
}
@@ -97,6 +99,7 @@
p.srcPath = data.SrcPath
p.symlinkTarget = data.SymlinkTarget
p.executable = data.Executable
+ p.effectiveLicenseFiles = data.EffectiveLicenseFiles
p.partition = data.Partition
p.skipInstall = data.SkipInstall
p.aconfigPaths = data.AconfigPaths
diff --git a/android/paths.go b/android/paths.go
index 9c2df65..ec05831 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -1363,21 +1363,21 @@
}
type outputPathGob struct {
- basePath
+ BasePath basePath
OutDir string
FullPath string
}
func (p *OutputPath) ToGob() *outputPathGob {
return &outputPathGob{
- basePath: p.basePath,
+ BasePath: p.basePath,
OutDir: p.outDir,
FullPath: p.fullPath,
}
}
func (p *OutputPath) FromGob(data *outputPathGob) {
- p.basePath = data.basePath
+ p.basePath = data.BasePath
p.outDir = data.OutDir
p.fullPath = data.FullPath
}
@@ -1788,7 +1788,7 @@
}
type installPathGob struct {
- basePath
+ BasePath basePath
SoongOutDir string
PartitionDir string
Partition string
@@ -1798,7 +1798,7 @@
func (p *InstallPath) ToGob() *installPathGob {
return &installPathGob{
- basePath: p.basePath,
+ BasePath: p.basePath,
SoongOutDir: p.soongOutDir,
PartitionDir: p.partitionDir,
Partition: p.partition,
@@ -1808,7 +1808,7 @@
}
func (p *InstallPath) FromGob(data *installPathGob) {
- p.basePath = data.basePath
+ p.basePath = data.BasePath
p.soongOutDir = data.SoongOutDir
p.partitionDir = data.PartitionDir
p.partition = data.Partition
diff --git a/golang/golang_test.go b/golang/golang_test.go
index b909f59..0a4baed 100644
--- a/golang/golang_test.go
+++ b/golang/golang_test.go
@@ -16,9 +16,10 @@
import (
"android/soong/android"
- "github.com/google/blueprint/bootstrap"
- "path/filepath"
+ "regexp"
"testing"
+
+ "github.com/google/blueprint/bootstrap"
)
func TestGolang(t *testing.T) {
@@ -46,6 +47,12 @@
bin := result.ModuleForTests("gobin", result.Config.BuildOSTarget.String())
- expected := filepath.Join("out/soong/host", result.Config.PrebuiltOS(), "bin/go/gobin/obj/gobin")
- android.AssertPathsRelativeToTopEquals(t, "output files", []string{expected}, bin.OutputFiles(result.TestContext, t, ""))
+ expected := "^out/soong/host/" + result.Config.PrebuiltOS() + "/bin/go/gobin/?[^/]*/obj/gobin$"
+ actual := android.PathsRelativeToTop(bin.OutputFiles(result.TestContext, t, ""))
+ if len(actual) != 1 {
+ t.Fatalf("Expected 1 output file, got %v", actual)
+ }
+ if match, err := regexp.Match(expected, []byte(actual[0])); err != nil || !match {
+ t.Fatalf("Expected output file to match %q, but got %q", expected, actual[0])
+ }
}