Lines Matching refs:test

176 func (test *testBinary) testPerSrc() bool {
177 return Bool(test.Properties.Test_per_src)
180 func (test *testBinary) srcs() []string {
181 return test.baseCompiler.Properties.Srcs
184 func (test *testBinary) dataPaths() []android.DataPath {
185 return test.data
188 func (test *testBinary) isAllTestsVariation() bool {
189 stem := test.binaryDecorator.Properties.Stem
193 func (test *testBinary) setSrc(name, src string) {
194 test.baseCompiler.Properties.Srcs = []string{src}
195 test.binaryDecorator.Properties.Stem = StringPtr(name)
198 func (test *testBinary) unsetSrc() {
199 test.baseCompiler.Properties.Srcs = nil
200 test.binaryDecorator.Properties.Stem = StringPtr("")
207 if test, ok := m.linker.(testPerSrc); ok {
208 numTests := len(test.srcs())
209 if test.testPerSrc() && numTests > 0 {
210 if duplicate, found := android.CheckDuplicate(test.srcs()); found {
215 for i, src := range test.srcs() {
234 for i, src := range test.srcs() {
249 func (test *testDecorator) gtest() bool {
250 return BoolDefault(test.Properties.Gtest, true)
253 func (test *testDecorator) testBinary() bool {
257 func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
258 if !test.gtest() {
281 func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
282 if test.gtest() {
285 } else if BoolDefault(test.Properties.Isolated, false) {
300 func (test *testDecorator) linkerInit(ctx BaseModuleContext, linker *baseLinker) {
317 func (test *testDecorator) linkerProps() []interface{} {
318 return []interface{}{&test.Properties}
335 func (test *testBinary) linkerProps() []interface{} {
336 props := append(test.testDecorator.linkerProps(), test.binaryDecorator.linkerProps()...)
337 props = append(props, &test.Properties)
341 func (test *testBinary) linkerInit(ctx BaseModuleContext) {
342 test.testDecorator.linkerInit(ctx, test.binaryDecorator.baseLinker)
343 test.binaryDecorator.linkerInit(ctx)
346 func (test *testBinary) linkerDeps(ctx DepsContext, deps Deps) Deps {
347 deps = test.testDecorator.linkerDeps(ctx, deps)
348 deps = test.binaryDecorator.linkerDeps(ctx, deps)
349 deps.DataLibs = append(deps.DataLibs, test.Properties.Data_libs...)
353 func (test *testBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
354 flags = test.binaryDecorator.linkerFlags(ctx, flags)
355 flags = test.testDecorator.linkerFlags(ctx, flags)
359 func (test *testBinary) install(ctx ModuleContext, file android.Path) {
366 dataSrcPaths := android.PathsForModuleSrc(ctx, test.Properties.Data)
369 test.data = append(test.data, android.DataPath{SrcPath: dataSrcPath})
384 test.data = append(test.data,
391 for _, module := range test.Properties.Test_mainline_modules {
394 if Bool(test.Properties.Require_root) {
401 if Bool(test.Properties.Disable_framework) {
405 if Bool(test.testDecorator.Properties.Isolated) {
408 if test.Properties.Test_options.Run_test_as != nil {
409 …configs = append(configs, tradefed.Option{Name: "run-test-as", Value: String(test.Properties.Test_…
411 for _, tag := range test.Properties.Test_options.Test_suite_tag {
414 if test.Properties.Test_options.Min_shipping_api_level != nil {
415 if test.Properties.Test_options.Vsr_min_shipping_api_level != nil {
419 …s, tradefed.Option{Name: "min-api-level", Value: strconv.FormatInt(int64(*test.Properties.Test_opt…
421 } else if test.Properties.Test_min_api_level != nil {
423 if test.Properties.Test_options.Vsr_min_shipping_api_level != nil {
427 …s, tradefed.Option{Name: "min-api-level", Value: strconv.FormatInt(int64(*test.Properties.Test_min…
430 if test.Properties.Test_options.Vsr_min_shipping_api_level != nil {
432 …radefed.Option{Name: "vsr-min-api-level", Value: strconv.FormatInt(int64(*test.Properties.Test_opt…
435 if test.Properties.Test_options.Min_vndk_version != nil {
437 …s, tradefed.Option{Name: "min-api-level", Value: strconv.FormatInt(int64(*test.Properties.Test_opt…
442 test.testConfig = tradefed.AutoGenNativeTestConfig(ctx, test.Properties.Test_config,
443test.Properties.Test_config_template, test.Properties.Test_suites, configs, test.Properties.Auto_g…
445test.extraTestConfigs = android.PathsForModuleSrc(ctx, test.Properties.Test_options.Extra_test_con…
447 test.binaryDecorator.baseInstaller.dir = "nativetest"
448 test.binaryDecorator.baseInstaller.dir64 = "nativetest64"
450 if !Bool(test.Properties.No_named_install_directory) {
451 test.binaryDecorator.baseInstaller.relative = ctx.ModuleName()
452 } else if String(test.binaryDecorator.baseInstaller.Properties.Relative_install_path) == "" {
456 if ctx.Host() && test.gtest() && test.Properties.Test_options.Unit_test == nil {
457 test.Properties.Test_options.Unit_test = proptools.BoolPtr(true)
459 test.binaryDecorator.baseInstaller.install(ctx, file)
467 test := &testBinary{
474 module.compiler = test
475 module.linker = test
476 module.installer = test
485 func (test *testLibrary) linkerProps() []interface{} {
486 return append(test.testDecorator.linkerProps(), test.libraryDecorator.linkerProps()...)
489 func (test *testLibrary) linkerInit(ctx BaseModuleContext) {
490 test.testDecorator.linkerInit(ctx, test.libraryDecorator.baseLinker)
491 test.libraryDecorator.linkerInit(ctx)
494 func (test *testLibrary) linkerDeps(ctx DepsContext, deps Deps) Deps {
495 deps = test.testDecorator.linkerDeps(ctx, deps)
496 deps = test.libraryDecorator.linkerDeps(ctx, deps)
500 func (test *testLibrary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
501 flags = test.libraryDecorator.linkerFlags(ctx, flags)
502 flags = test.testDecorator.linkerFlags(ctx, flags)
509 test := &testLibrary{
515 module.linker = test