Lines Matching refs:test

160 func (test *testBinary) testPerSrc() bool {
161 return Bool(test.Properties.Test_per_src)
164 func (test *testBinary) srcs() []string {
165 return test.baseCompiler.Properties.Srcs
168 func (test *testBinary) dataPaths() []android.DataPath {
169 return test.data
172 func (test *testBinary) isAllTestsVariation() bool {
173 stem := test.binaryDecorator.Properties.Stem
177 func (test *testBinary) setSrc(name, src string) {
178 test.baseCompiler.Properties.Srcs = []string{src}
179 test.binaryDecorator.Properties.Stem = StringPtr(name)
182 func (test *testBinary) unsetSrc() {
183 test.baseCompiler.Properties.Srcs = nil
184 test.binaryDecorator.Properties.Stem = StringPtr("")
191 if test, ok := m.linker.(testPerSrc); ok {
192 numTests := len(test.srcs())
193 if test.testPerSrc() && numTests > 0 {
194 if duplicate, found := android.CheckDuplicate(test.srcs()); found {
199 for i, src := range test.srcs() {
218 for i, src := range test.srcs() {
232 func (test *testDecorator) gtest() bool {
233 return BoolDefault(test.Properties.Gtest, true)
236 func (test *testDecorator) testFor() []string {
237 return test.Properties.Test_for
240 func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
241 if !test.gtest() {
264 func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
265 if test.gtest() {
268 } else if BoolDefault(test.Properties.Isolated, false) {
283 func (test *testDecorator) linkerInit(ctx BaseModuleContext, linker *baseLinker) {
300 func (test *testDecorator) linkerProps() []interface{} {
301 return []interface{}{&test.Properties}
317 func (test *testBinary) linkerProps() []interface{} {
318 props := append(test.testDecorator.linkerProps(), test.binaryDecorator.linkerProps()...)
319 props = append(props, &test.Properties)
323 func (test *testBinary) linkerInit(ctx BaseModuleContext) {
324 test.testDecorator.linkerInit(ctx, test.binaryDecorator.baseLinker)
325 test.binaryDecorator.linkerInit(ctx)
328 func (test *testBinary) linkerDeps(ctx DepsContext, deps Deps) Deps {
329 deps = test.testDecorator.linkerDeps(ctx, deps)
330 deps = test.binaryDecorator.linkerDeps(ctx, deps)
331 deps.DataLibs = append(deps.DataLibs, test.Properties.Data_libs...)
335 func (test *testBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
336 flags = test.binaryDecorator.linkerFlags(ctx, flags)
337 flags = test.testDecorator.linkerFlags(ctx, flags)
341 func (test *testBinary) install(ctx ModuleContext, file android.Path) {
342 dataSrcPaths := android.PathsForModuleSrc(ctx, test.Properties.Data)
345 test.data = append(test.data, android.DataPath{SrcPath: dataSrcPath})
360 test.data = append(test.data,
369 for _, module := range test.Properties.Test_mainline_modules {
372 if Bool(test.Properties.Require_root) {
379 if Bool(test.Properties.Disable_framework) {
383 if Bool(test.testDecorator.Properties.Isolated) {
386 if test.Properties.Test_options.Run_test_as != nil {
387 …configs = append(configs, tradefed.Option{Name: "run-test-as", Value: String(test.Properties.Test_…
389 for _, tag := range test.Properties.Test_options.Test_suite_tag {
392 if test.Properties.Test_min_api_level != nil && test.Properties.Test_min_sdk_version != nil {
394 } else if test.Properties.Test_min_api_level != nil {
396 min_level = strconv.FormatInt(int64(*test.Properties.Test_min_api_level), 10)
397 } else if test.Properties.Test_min_sdk_version != nil {
399 min_level = strconv.FormatInt(int64(*test.Properties.Test_min_sdk_version), 10)
408 test.testConfig = tradefed.AutoGenNativeTestConfig(ctx, test.Properties.Test_config,
409test.Properties.Test_config_template, test.Properties.Test_suites, configs, test.Properties.Auto_g…
411 test.binaryDecorator.baseInstaller.dir = "nativetest"
412 test.binaryDecorator.baseInstaller.dir64 = "nativetest64"
414 if !Bool(test.Properties.No_named_install_directory) {
415 test.binaryDecorator.baseInstaller.relative = ctx.ModuleName()
416 } else if String(test.binaryDecorator.baseInstaller.Properties.Relative_install_path) == "" {
420 test.binaryDecorator.baseInstaller.install(ctx, file)
428 test := &testBinary{
435 module.compiler = test
436 module.linker = test
437 module.installer = test
446 func (test *testLibrary) linkerProps() []interface{} {
447 return append(test.testDecorator.linkerProps(), test.libraryDecorator.linkerProps()...)
450 func (test *testLibrary) linkerInit(ctx BaseModuleContext) {
451 test.testDecorator.linkerInit(ctx, test.libraryDecorator.baseLinker)
452 test.libraryDecorator.linkerInit(ctx)
455 func (test *testLibrary) linkerDeps(ctx DepsContext, deps Deps) Deps {
456 deps = test.testDecorator.linkerDeps(ctx, deps)
457 deps = test.libraryDecorator.linkerDeps(ctx, deps)
461 func (test *testLibrary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
462 flags = test.libraryDecorator.linkerFlags(ctx, flags)
463 flags = test.testDecorator.linkerFlags(ctx, flags)
470 test := &testLibrary{
476 module.linker = test