Lines Matching refs:r
83 func (r *robolectricTest) TestSuites() []string {
84 return r.testProperties.Test_suites
89 func (r *robolectricTest) DepsMutator(ctx android.BottomUpMutatorContext) {
90 r.Library.DepsMutator(ctx)
92 if r.robolectricProperties.Instrumentation_for != nil {
93 …ctx.AddVariationDependencies(nil, instrumentationForTag, String(r.robolectricProperties.Instrument…
100 ctx.AddVariationDependencies(nil, roboCoverageLibsTag, r.robolectricProperties.Coverage_libs...)
105 func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
106 r.testConfig = tradefed.AutoGenRobolectricTestConfig(ctx, r.testProperties.Test_config,
107 r.testProperties.Test_config_template, r.testProperties.Test_suites,
108 r.testProperties.Auto_gen_config)
109 r.data = android.PathsForModuleSrc(ctx, r.testProperties.Data)
126 r.manifest = instrumentedApp.mergedManifestFile
127 r.resourceApk = instrumentedApp.outputFile
130 r.extraResources = android.Paths{roboTestConfig}
132 r.Library.GenerateAndroidBuildActions(ctx)
135 r.generateRoboSrcJar(ctx, roboSrcJar, instrumentedApp)
136 r.roboSrcJar = roboSrcJar
146 r.outputFile,
152 r.libs = append(r.libs, m.BaseModuleName())
158 r.combinedJar = android.PathForModuleOut(ctx, "robolectric_combined", r.outputFile.Base())
159 TransformJarsToJar(ctx, r.combinedJar, "combine jars", combinedJarJars, android.OptionalPath{},
164 for _, src := range r.compiledJavaSrcs {
173 r.tests = append(r.tests, s)
176 r.data = append(r.data, r.manifest, r.resourceApk)
180 installPath := android.PathForModuleInstall(ctx, r.BaseModuleName())
182 installedResourceApk := ctx.InstallFile(installPath, ctx.ModuleName()+".apk", r.resourceApk)
183 …installedManifest := ctx.InstallFile(installPath, ctx.ModuleName()+"-AndroidManifest.xml", r.manif…
184 installedConfig := ctx.InstallFile(installPath, ctx.ModuleName()+".config", r.testConfig)
192 for _, data := range android.PathsForModuleSrc(ctx, r.testProperties.Data) {
197 ctx.InstallFile(installPath, ctx.ModuleName()+".jar", r.combinedJar, installDeps...)
241 func (r *robolectricTest) generateRoboSrcJar(ctx android.ModuleContext, outputFile android.Writable…
258 func (r *robolectricTest) AndroidMkEntries() []android.AndroidMkEntries {
259 entriesList := r.Library.AndroidMkEntries()
264 if s := r.robolectricProperties.Test_options.Shards; s != nil && *s > 1 {
266 shardSize := (len(r.tests) + numShards - 1) / numShards
267 shards := android.ShardStrings(r.tests, shardSize)
269 r.writeTestRunner(w, name, "Run"+name+strconv.Itoa(i), shard)
281 r.writeTestRunner(w, name, "Run"+name, r.tests)
289 func (r *robolectricTest) writeTestRunner(w io.Writer, module, name string, tests []string) {
294 fmt.Fprintln(w, "LOCAL_JAVA_LIBRARIES += ", strings.Join(r.libs, " "))
295 fmt.Fprintln(w, "LOCAL_TEST_PACKAGE :=", String(r.robolectricProperties.Instrumentation_for))
296 fmt.Fprintln(w, "LOCAL_INSTRUMENT_SRCJARS :=", r.roboSrcJar.String())
298 if t := r.robolectricProperties.Test_options.Timeout; t != nil {
329 func (r *robolectricTest) InstallBypassMake() bool { return true }
330 func (r *robolectricTest) InstallInTestcases() bool { return true }
331 func (r *robolectricTest) InstallForceOS() *android.OsType { return &android.BuildOs }
353 func (r *robolectricRuntimes) TestSuites() []string {
359 func (r *robolectricRuntimes) DepsMutator(ctx android.BottomUpMutatorContext) {
360 if !ctx.Config().UnbundledBuildUsePrebuiltSdks() && r.props.Lib != nil {
361 ctx.AddVariationDependencies(nil, libTag, String(r.props.Lib))
365 func (r *robolectricRuntimes) GenerateAndroidBuildActions(ctx android.ModuleContext) {
366 files := android.PathsForModuleSrc(ctx, r.props.Jars)
371 r.runtimes = append(r.runtimes, installedRuntime)
374 if !ctx.Config().UnbundledBuildUsePrebuiltSdks() && r.props.Lib != nil {
375 runtimeFromSourceModule := ctx.GetDirectDepWithTag(String(r.props.Lib), libTag)
381 r.runtimes = append(r.runtimes, installedRuntime)
385 func (r *robolectricRuntimes) InstallBypassMake() bool { return true }
386 func (r *robolectricRuntimes) InstallInTestcases() bool { return true }
387 func (r *robolectricRuntimes) InstallForceOS() *android.OsType { return &android.BuildOs }