From 22bafec0425313fb49b6f64a609537ee1b60a76e Mon Sep 17 00:00:00 2001 From: yangbill Date: Fri, 11 Feb 2022 18:06:07 +0800 Subject: Propagate data_bins from Soong to Make Write the list of a test module's data_bins value to the `LOCAL_TEST_DATA_BINS` Makefile variable defined for each module. This enables downstream tools to correctly set up the runtime environment for execution. And currently only sh_test, cc_tests, and rust_tests has this attribute in Android.bp. Bug: 215234071 Test: m out/soong/Android-aosp_cf_x86_64_phone.mk Change-Id: I8d47f5f9b25afdc5975c6b414405badb38dbde4b --- sh/sh_binary.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sh') diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 2ab784d52..4190e84b8 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -458,6 +458,9 @@ func (s *ShTest) AndroidMkEntries() []android.AndroidMkEntries { dir := strings.TrimSuffix(s.dataModules[relPath].String(), relPath) entries.AddStrings("LOCAL_TEST_DATA", dir+":"+relPath) } + if s.testProperties.Data_bins != nil { + entries.AddStrings("LOCAL_TEST_DATA_BINS", s.testProperties.Data_bins...) + } if Bool(s.testProperties.Test_options.Unit_test) { entries.SetBool("LOCAL_IS_UNIT_TEST", true) } -- cgit v1.2.3-59-g8ed1b