• Home
  • Raw
  • Download

Lines Matching refs:ctx

28 func getTestConfigTemplate(ctx android.ModuleContext, prop *string) android.OptionalPath {
29 return ctx.ExpandOptionalSource(prop, "test_config_template")
32 func getTestConfig(ctx android.ModuleContext, prop *string) android.Path {
33 if p := ctx.ExpandOptionalSource(prop, "test_config"); p.Valid() {
35 } else if p := android.ExistentPathForSource(ctx, ctx.ModuleDir(), "AndroidTest.xml"); p.Valid() {
46 func testConfigPath(ctx android.ModuleContext, prop *string, testSuites []string) (path android.Pat…
47 if p := getTestConfig(ctx, prop); p != nil {
50 outputFile := android.PathForModuleOut(ctx, ctx.ModuleName()+".config")
60 func autogenTemplate(ctx android.ModuleContext, output android.WritablePath, template string, optio…
72 ctx.Build(pctx, android.BuildParams{
77 "name": ctx.ModuleName(),
84 func AutoGenNativeTestConfig(ctx android.ModuleContext, testConfigProp *string,
87 path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites)
89 templatePath := getTestConfigTemplate(ctx, testConfigTemplateProp)
91 autogenTemplate(ctx, autogenPath, templatePath.String(), optionsMap)
93 if ctx.Device() {
94 autogenTemplate(ctx, autogenPath, "${NativeTestConfigTemplate}",
97 autogenTemplate(ctx, autogenPath, "${NativeHostTestConfigTemplate}",
106 func AutoGenNativeBenchmarkTestConfig(ctx android.ModuleContext, testConfigProp *string,
108 path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites)
110 templatePath := getTestConfigTemplate(ctx, testConfigTemplateProp)
112 autogenTemplate(ctx, autogenPath, templatePath.String(), nil)
114 autogenTemplate(ctx, autogenPath, "${NativeBenchmarkTestConfigTemplate}", nil)
121 func AutoGenJavaTestConfig(ctx android.ModuleContext, testConfigProp *string, testConfigTemplatePro…
122 path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites)
124 templatePath := getTestConfigTemplate(ctx, testConfigTemplateProp)
126 autogenTemplate(ctx, autogenPath, templatePath.String(), nil)
128 if ctx.Device() {
129 autogenTemplate(ctx, autogenPath, "${JavaTestConfigTemplate}", nil)
131 autogenTemplate(ctx, autogenPath, "${JavaHostTestConfigTemplate}", nil)
139 func AutoGenPythonBinaryHostTestConfig(ctx android.ModuleContext, testConfigProp *string,
142 path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites)
144 templatePath := getTestConfigTemplate(ctx, testConfigTemplateProp)
146 autogenTemplate(ctx, autogenPath, templatePath.String(), nil)
148 autogenTemplate(ctx, autogenPath, "${PythonBinaryHostTestConfigTemplate}", nil)
164 func AutoGenInstrumentationTestConfig(ctx android.ModuleContext, testConfigProp *string, testConfig…
165 path, autogenPath := testConfigPath(ctx, testConfigProp, testSuites)
168 moduleTemplate := getTestConfigTemplate(ctx, testConfigTemplateProp)
172 ctx.Build(pctx, android.BuildParams{
178 "name": ctx.ModuleName(),