Lines Matching refs:s
174 func (s *ShBinary) HostToolPath() android.OptionalPath {
175 return android.OptionalPathForPath(s.installedFile)
178 func (s *ShBinary) DepsMutator(ctx android.BottomUpMutatorContext) {
181 func (s *ShBinary) OutputFile() android.OutputPath {
182 return s.outputFilePath
185 func (s *ShBinary) SubDir() string {
186 return proptools.String(s.properties.Sub_dir)
189 func (s *ShBinary) Installable() bool {
190 return s.properties.Installable == nil || proptools.Bool(s.properties.Installable)
193 func (s *ShBinary) Symlinks() []string {
194 return s.properties.Symlinks
199 func (s *ShBinary) ImageMutatorBegin(ctx android.BaseModuleContext) {}
201 func (s *ShBinary) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
202 return !s.ModuleBase.InstallInRecovery() && !s.ModuleBase.InstallInRamdisk()
205 func (s *ShBinary) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
206 return proptools.Bool(s.properties.Ramdisk_available) || s.ModuleBase.InstallInRamdisk()
209 func (s *ShBinary) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
210 …return proptools.Bool(s.properties.Vendor_ramdisk_available) || s.ModuleBase.InstallInVendorRamdis…
213 func (s *ShBinary) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
217 func (s *ShBinary) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
218 return proptools.Bool(s.properties.Recovery_available) || s.ModuleBase.InstallInRecovery()
221 func (s *ShBinary) ExtraImageVariations(ctx android.BaseModuleContext) []string {
225 func (s *ShBinary) SetImageVariation(ctx android.BaseModuleContext, variation string, module androi…
228 func (s *ShBinary) generateAndroidBuildActions(ctx android.ModuleContext) {
229 if s.properties.Src == nil {
233 s.sourceFilePath = android.PathForModuleSrc(ctx, proptools.String(s.properties.Src))
234 filename := proptools.String(s.properties.Filename)
235 filenameFromSrc := proptools.Bool(s.properties.Filename_from_src)
238 filename = s.sourceFilePath.Base()
246 s.outputFilePath = android.PathForModuleOut(ctx, filename).OutputPath
252 Output: s.outputFilePath,
253 Input: s.sourceFilePath,
257 func (s *ShBinary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
258 s.generateAndroidBuildActions(ctx)
259 installDir := android.PathForModuleInstall(ctx, "bin", proptools.String(s.properties.Sub_dir))
260 s.installedFile = ctx.InstallExecutable(installDir, s.outputFilePath.Base(), s.outputFilePath)
263 func (s *ShBinary) AndroidMkEntries() []android.AndroidMkEntries {
266 OutputFile: android.OptionalPathForPath(s.outputFilePath),
270 s.customAndroidMkEntries(entries)
271 entries.SetString("LOCAL_MODULE_RELATIVE_PATH", proptools.String(s.properties.Sub_dir))
277 func (s *ShBinary) customAndroidMkEntries(entries *android.AndroidMkEntries) {
279 entries.SetString("LOCAL_MODULE_STEM", s.outputFilePath.Rel())
280 if len(s.properties.Symlinks) > 0 {
281 entries.SetString("LOCAL_MODULE_SYMLINKS", strings.Join(s.properties.Symlinks, " "))
299 func (s *ShTest) DepsMutator(ctx android.BottomUpMutatorContext) {
300 s.ShBinary.DepsMutator(ctx)
302 …ctx.AddFarVariationDependencies(ctx.Target().Variations(), shTestDataBinsTag, s.testProperties.Dat…
304 shTestDataLibsTag, s.testProperties.Data_libs...)
307 …ctx.AddFarVariationDependencies(deviceVariations, shTestDataDeviceBinsTag, s.testProperties.Data_d…
309 shTestDataDeviceLibsTag, s.testProperties.Data_device_libs...)
311 if len(s.testProperties.Data_device_bins) > 0 {
314 if len(s.testProperties.Data_device_libs) > 0 {
320 func (s *ShTest) addToDataModules(ctx android.ModuleContext, relPath string, path android.Path) {
321 if _, exists := s.dataModules[relPath]; exists {
323 relPath, s.dataModules[relPath].String(), path.String())
326 s.dataModules[relPath] = path
329 func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
330 s.ShBinary.generateAndroidBuildActions(ctx)
340 if s.SubDir() != "" {
343 s.installDir = android.PathForModuleInstall(ctx, testDir, s.SubDir())
345 s.installDir = android.PathForModuleInstall(ctx, testDir, s.Name())
347 s.installedFile = ctx.InstallExecutable(s.installDir, s.outputFilePath.Base(), s.outputFilePath)
349 s.data = android.PathsForModuleSrc(ctx, s.testProperties.Data)
352 if Bool(s.testProperties.Require_root) {
358 if len(s.testProperties.Data_device_bins) > 0 {
359 moduleName := s.Name()
362 for _, bin := range s.testProperties.Data_device_bins {
367 s.testConfig = tradefed.AutoGenShellTestConfig(ctx, s.testProperties.Test_config,
368 …s.testProperties.Test_config_template, s.testProperties.Test_suites, configs, s.testProperties.Aut…
370 s.dataModules = make(map[string]android.Path)
376 s.addToDataModules(ctx, path.Base(), path)
387 if _, exist := s.dataModules[relPath]; exist {
396 s.addToDataModules(ctx, relPath, relocatedLib)
408 func (s *ShTest) InstallInData() bool {
412 func (s *ShTest) AndroidMkEntries() []android.AndroidMkEntries {
415 OutputFile: android.OptionalPathForPath(s.outputFilePath),
419 s.customAndroidMkEntries(entries)
420 entries.SetPath("LOCAL_MODULE_PATH", s.installDir.ToMakePath())
421 entries.AddCompatibilityTestSuites(s.testProperties.Test_suites...)
422 if s.testConfig != nil {
423 entries.SetPath("LOCAL_FULL_TEST_CONFIG", s.testConfig)
425 for _, d := range s.data {
435 for relPath, _ := range s.dataModules {
440 dir := strings.TrimSuffix(s.dataModules[relPath].String(), relPath)
448 func InitShBinaryModule(s *ShBinary) {
449 s.AddProperties(&s.properties)
450 android.InitBazelModule(s)