summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/strip.sh7
-rw-r--r--sh/sh_binary.go22
2 files changed, 28 insertions, 1 deletions
diff --git a/scripts/strip.sh b/scripts/strip.sh
index 8d69f0d12..5320ef620 100755
--- a/scripts/strip.sh
+++ b/scripts/strip.sh
@@ -101,7 +101,12 @@ do_strip_keep_mini_debug_info_darwin() {
do_strip_keep_mini_debug_info_linux() {
rm -f "${outfile}.mini_debuginfo.xz"
local fail=
- "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true
+ if [ -z "${windows}" ]; then
+ "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true
+ else
+ # --keep-section not supported for Windows COFF.
+ fail=true
+ fi
if [ -z $fail ]; then
# create_minidebuginfo has issues with compressed debug sections. Just
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index d753d246a..77066f149 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -530,6 +530,28 @@ func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
MkAppClass: mkEntries.Class,
InstallDir: s.installDir,
})
+
+ moduleInfoJSON := ctx.ModuleInfoJSON()
+ moduleInfoJSON.Class = []string{"NATIVE_TESTS"}
+ if len(s.testProperties.Test_suites) > 0 {
+ moduleInfoJSON.CompatibilitySuites = append(moduleInfoJSON.CompatibilitySuites, s.testProperties.Test_suites...)
+ } else {
+ moduleInfoJSON.CompatibilitySuites = append(moduleInfoJSON.CompatibilitySuites, "null-suite")
+ }
+ if proptools.Bool(s.testProperties.Test_options.Unit_test) {
+ moduleInfoJSON.IsUnitTest = "true"
+ if ctx.Host() {
+ moduleInfoJSON.CompatibilitySuites = append(moduleInfoJSON.CompatibilitySuites, "host-unit-tests")
+ }
+ }
+ moduleInfoJSON.DataDependencies = append(moduleInfoJSON.DataDependencies, s.testProperties.Data_bins...)
+ if s.testConfig != nil {
+ if _, ok := s.testConfig.(android.WritablePath); ok {
+ moduleInfoJSON.AutoTestConfig = []string{"true"}
+ }
+ moduleInfoJSON.TestConfig = append(moduleInfoJSON.TestConfig, s.testConfig.String())
+ }
+ moduleInfoJSON.TestConfig = append(moduleInfoJSON.TestConfig, s.extraTestConfigs.Strings()...)
}
func addArch(archType string, paths android.Paths) []string {