• Home
  • Raw
  • Download

Lines Matching refs:test

123 func (test *testBinary) testPerSrc() bool {
124 return Bool(test.Properties.Test_per_src)
127 func (test *testBinary) srcs() []string {
128 return test.baseCompiler.Properties.Srcs
131 func (test *testBinary) setSrc(name, src string) {
132 test.baseCompiler.Properties.Srcs = []string{src}
133 test.binaryDecorator.Properties.Stem = StringPtr(name)
140 if test, ok := m.linker.(testPerSrc); ok {
141 if test.testPerSrc() && len(test.srcs()) > 0 {
142 if duplicate, found := checkDuplicate(test.srcs()); found {
146 testNames := make([]string, len(test.srcs()))
147 for i, src := range test.srcs() {
151 for i, src := range test.srcs() {
175 func (test *testDecorator) gtest() bool {
176 return BoolDefault(test.Properties.Gtest, true)
179 func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
180 if !test.gtest() {
203 func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
204 if test.gtest() {
207 } else if BoolDefault(test.Properties.Isolated, false) {
217 func (test *testDecorator) linkerInit(ctx BaseModuleContext, linker *baseLinker) {
234 func (test *testDecorator) linkerProps() []interface{} {
235 return []interface{}{&test.Properties}
251 func (test *testBinary) linkerProps() []interface{} {
252 props := append(test.testDecorator.linkerProps(), test.binaryDecorator.linkerProps()...)
253 props = append(props, &test.Properties)
257 func (test *testBinary) linkerInit(ctx BaseModuleContext) {
258 test.testDecorator.linkerInit(ctx, test.binaryDecorator.baseLinker)
259 test.binaryDecorator.linkerInit(ctx)
262 func (test *testBinary) linkerDeps(ctx DepsContext, deps Deps) Deps {
263 deps = test.testDecorator.linkerDeps(ctx, deps)
264 deps = test.binaryDecorator.linkerDeps(ctx, deps)
268 func (test *testBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
269 flags = test.binaryDecorator.linkerFlags(ctx, flags)
270 flags = test.testDecorator.linkerFlags(ctx, flags)
274 func (test *testBinary) install(ctx ModuleContext, file android.Path) {
275 test.data = android.PathsForModuleSrc(ctx, test.Properties.Data)
277 if Bool(test.testDecorator.Properties.Isolated) {
281 if test.Properties.Test_options.Run_test_as != nil {
282 optionsMap["run-test-as"] = String(test.Properties.Test_options.Run_test_as)
285 test.testConfig = tradefed.AutoGenNativeTestConfig(ctx, test.Properties.Test_config,
286 test.Properties.Test_config_template,
287 test.Properties.Test_suites, optionsMap)
289 test.binaryDecorator.baseInstaller.dir = "nativetest"
290 test.binaryDecorator.baseInstaller.dir64 = "nativetest64"
292 if !Bool(test.Properties.No_named_install_directory) {
293 test.binaryDecorator.baseInstaller.relative = ctx.ModuleName()
294 } else if String(test.binaryDecorator.baseInstaller.Properties.Relative_install_path) == "" {
298 test.binaryDecorator.baseInstaller.install(ctx, file)
306 test := &testBinary{
313 module.compiler = test
314 module.linker = test
315 module.installer = test
324 func (test *testLibrary) linkerProps() []interface{} {
325 return append(test.testDecorator.linkerProps(), test.libraryDecorator.linkerProps()...)
328 func (test *testLibrary) linkerInit(ctx BaseModuleContext) {
329 test.testDecorator.linkerInit(ctx, test.libraryDecorator.baseLinker)
330 test.libraryDecorator.linkerInit(ctx)
333 func (test *testLibrary) linkerDeps(ctx DepsContext, deps Deps) Deps {
334 deps = test.testDecorator.linkerDeps(ctx, deps)
335 deps = test.libraryDecorator.linkerDeps(ctx, deps)
339 func (test *testLibrary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
340 flags = test.libraryDecorator.linkerFlags(ctx, flags)
341 flags = test.testDecorator.linkerFlags(ctx, flags)
348 test := &testLibrary{
354 module.linker = test