Support filename and sub_dir attributes in sh_binary

Test: test by building system/timezone/apex:com.android.tzdata
Change-Id: I08114910fccbdacf6750e237d3e80ba37fde7651
This commit is contained in:
Yu Liu
2021-11-23 14:53:41 -08:00
parent a5524e3272
commit b302455879
2 changed files with 23 additions and 4 deletions

View File

@@ -62,11 +62,15 @@ func TestShBinarySimple(t *testing.T) {
blueprint: `sh_binary {
name: "foo",
src: "foo.sh",
filename: "foo.exe",
sub_dir: "sub",
bazel_module: { bp2build_available: true },
}`,
expectedBazelTargets: []string{
makeBazelTarget("sh_binary", "foo", attrNameToString{
"srcs": `["foo.sh"]`,
"srcs": `["foo.sh"]`,
"filename": `"foo.exe"`,
"sub_dir": `"sub"`,
})},
})
}