diff options
author | 2023-08-23 16:11:26 -0700 | |
---|---|---|
committer | 2023-08-24 09:47:35 -0700 | |
commit | 39b614af176ee2e1d9752ed73b23ecf30473191f (patch) | |
tree | a2eebdde94a3cf5f09825d3488116c77543b1718 /android/defs.go | |
parent | 573eabaa62bf1aeb46b22f4879e859b551d2c088 (diff) |
Add the system image test to the bazel sandwich
Also make -test.sh files executable, while we wait for a bazel update
that will tell us which FileWrite actions should be executable.
Bug: 297268692
Test: m bazel_sandwich
Change-Id: I60498577ba12813bff8bbdbc1b997ea4addefd17
Diffstat (limited to 'android/defs.go')
-rw-r--r-- | android/defs.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/android/defs.go b/android/defs.go index 18eed2dae..682111ea5 100644 --- a/android/defs.go +++ b/android/defs.go @@ -209,12 +209,14 @@ func WriteFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content buildWriteFileRule(ctx, outputFile, content) } -func CatFileRule(ctx BuilderContext, paths Paths, outputFile WritablePath) { +// WriteExecutableFileRuleVerbatim is the same as WriteFileRuleVerbatim, but runs chmod +x on the result +func WriteExecutableFileRuleVerbatim(ctx BuilderContext, outputFile WritablePath, content string) { + intermediate := PathForIntermediates(ctx, "write_executable_file_intermediates").Join(ctx, outputFile.String()) + WriteFileRuleVerbatim(ctx, intermediate, content) ctx.Build(pctx, BuildParams{ - Rule: Cat, - Inputs: paths, - Output: outputFile, - Description: "combine files to " + outputFile.Base(), + Rule: CpExecutable, + Output: outputFile, + Input: intermediate, }) } |