diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 00:20:43 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-15 00:20:43 +0000 |
commit | cbb3f85ce7a7cd194e02875fd995ef60b8f738e4 (patch) | |
tree | 60ed9f004e318c6cf7e16a58335441b5dd7a5866 | |
parent | 7d73e88b1222e9ba2a354938798e7978e3756a78 (diff) | |
parent | ce6f14cafe6f7783cc9d40062a86e7c2b8860c3e (diff) | |
download | soong-android14-qpr2-s4-release.tar.gz |
Snap for 11220357 from ce6f14cafe6f7783cc9d40062a86e7c2b8860c3e to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: I603871450f264014c097b154a5eeb344cd55d594
-rw-r--r-- | cc/compiler.go | 2 | ||||
-rw-r--r-- | cmd/sbox/sbox.go | 25 | ||||
-rw-r--r-- | tradefed/suite_harness/tradefed_binary.go | 11 |
3 files changed, 13 insertions, 25 deletions
diff --git a/cc/compiler.go b/cc/compiler.go index bb7885bc7..c9de1b053 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -479,7 +479,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps target += strconv.Itoa(android.FutureApiLevelInt) } else { apiLevel := nativeApiLevelOrPanic(ctx, version) - target += apiLevel.String() + target += strconv.Itoa(apiLevel.FinalOrFutureInt()) } } diff --git a/cmd/sbox/sbox.go b/cmd/sbox/sbox.go index e69a93067..3364f503f 100644 --- a/cmd/sbox/sbox.go +++ b/cmd/sbox/sbox.go @@ -22,7 +22,6 @@ import ( "flag" "fmt" "io" - "io/fs" "io/ioutil" "os" "os/exec" @@ -479,8 +478,7 @@ func copyFiles(copies []*sbox_proto.Copy, fromDir, toDir string, exists existsTy // copyOneFile copies a file and its permissions. If forceExecutable is true it adds u+x to the // permissions. If exists is allowFromNotExists it returns nil if the from path doesn't exist. // If write is onlyWriteIfChanged then the output file is compared to the input file and not written to -// if it is the same, avoiding updating the timestamp. If from is a symlink, the symlink itself -// will be copied, instead of what it points to. +// if it is the same, avoiding updating the timestamp. func copyOneFile(from string, to string, forceExecutable bool, exists existsType, write writeType) error { err := os.MkdirAll(filepath.Dir(to), 0777) @@ -488,7 +486,7 @@ func copyOneFile(from string, to string, forceExecutable bool, exists existsType return err } - stat, err := os.Lstat(from) + stat, err := os.Stat(from) if err != nil { if os.IsNotExist(err) && exists == allowFromNotExists { return nil @@ -496,25 +494,6 @@ func copyOneFile(from string, to string, forceExecutable bool, exists existsType return err } - if stat.Mode()&fs.ModeSymlink != 0 { - linkTarget, err := os.Readlink(from) - if err != nil { - return err - } - if write == onlyWriteIfChanged { - toLinkTarget, err := os.Readlink(to) - if err == nil && toLinkTarget == linkTarget { - return nil - } - } - err = os.Remove(to) - if err != nil && !os.IsNotExist(err) { - return err - } - - return os.Symlink(linkTarget, to) - } - perm := stat.Mode() if forceExecutable { perm = perm | 0100 // u+x diff --git a/tradefed/suite_harness/tradefed_binary.go b/tradefed/suite_harness/tradefed_binary.go index 1ce94bcb9..96fb35418 100644 --- a/tradefed/suite_harness/tradefed_binary.go +++ b/tradefed/suite_harness/tradefed_binary.go @@ -35,6 +35,7 @@ type TradefedBinaryProperties struct { Short_name string Full_name string Version string + Suite_arch string Prepend_platform_version_name bool } @@ -67,6 +68,7 @@ func tradefedBinaryLoadHook(tfb *TradefedBinaryProperties) func(ctx android.Load Name: &genName, Short_name: tfb.Short_name, Full_name: tfb.Full_name, + Suite_arch: tfb.Suite_arch, Version: version, }) @@ -95,6 +97,7 @@ type TradefedBinaryGenProperties struct { Short_name string Full_name string Version string + Suite_arch string } type tradefedBinaryGen struct { @@ -127,13 +130,19 @@ var tradefedBinaryGenRule = pctx.StaticRule("tradefedBinaryGenRule", blueprint.R func (tfg *tradefedBinaryGen) GenerateAndroidBuildActions(ctx android.ModuleContext) { buildNumberFile := ctx.Config().BuildNumberFile(ctx) outputFile := android.PathForModuleOut(ctx, "test-suite-info.properties") + + arch := strings.ReplaceAll(tfg.properties.Suite_arch, " ", "") + if arch == "" { + arch = ctx.Config().DevicePrimaryArchType().String() + } + ctx.Build(pctx, android.BuildParams{ Rule: tradefedBinaryGenRule, Output: outputFile, OrderOnly: android.Paths{buildNumberFile}, Args: map[string]string{ "buildNumberFile": buildNumberFile.String(), - "arch": ctx.Config().DevicePrimaryArchType().String(), + "arch": arch, "name": tfg.properties.Short_name, "fullname": tfg.properties.Full_name, "version": tfg.properties.Version, |