aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
Commit message (Collapse)AuthorAge
* Inline @Deprecated methods in CustomCommandLine.Gravatar tomlu2017-08-11
| | | | | | | | | Apart from updating CustomCommandLineTest this CL is entirely automated. We also sneak in a rename of addFormat -> addFormatted. RELNOTES: None PiperOrigin-RevId: 164870140
* Automated rollback of commit 8adcf839c5c42defaa2fabedfb0208e4ce97ac95.Gravatar ajmichael2017-08-10
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 164775289
* Change logic of Blaze Java coverage.Gravatar elenairina2017-08-08
| | | | | | | | | | | | | | | | | | Change is needed due to the fact that java_import or other custom rules (genrules or Skylark) do not propagate coverage information. The lack of coverage data is caused by the fact that it is retrieved from compilation information and it is passed around through providers as Artifact(s) (also known as instrumentation metadata). The problem with the current implementation is that there is no way of retrieving instrumentation metadata from arbitrary jars provided by java_import or other custom rules. The instrumentation metadata in the current implementation is a separate jar that contains uninstrumented classes for offline Jacoco instrumentation. This change addresses that problem by having just one jar instead of 2 (the build jar and the instrumentation jar), adding the uninstrumented classes in the build jar and completely removing any other instrumentation metadata. Implementation details: * For each build jar there is a .txt file created that contains the relative path of each Java file. This file will also be included in the final build jar. It is used for recreating the correct path for each covered file when included in the coverage report. * java_binary/java_test will set 2 environment variables: 1) JACOCO_METADATA_JARS - replaces the previous JACOCO_METADATA_JAR that was a jar that merged all the uninstrumented classes on the classpath in one jar. The new environment variable holds the paths of the runtime classpath jars - only some of them contain uninstrumented classes, letting the Jacoco coverage runner to filter and analyze them. 2) JACOCO_MAIN_CLASS - The main class to be called for the current coverage run. Previously this information was embedded in the JACOCO_METADATA_JAR's manifest. PiperOrigin-RevId: 164562533
* Move RuleConfiguredTargetFactory to lib.analysisGravatar ulfjack2017-08-07
| | | | | | | This is part of splitting up the build-base library into separate libraries for analysis, exec, and rules. PiperOrigin-RevId: 164446955
* Automated rollback of commit a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c.Gravatar laszlocsomor2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Caused memory regression. *** Original change description *** CustomCommandLine.Builder: clean up its interface In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see... *** RELNOTES: none PiperOrigin-RevId: 162320031
* CustomCommandLine.Builder: clean up its interfaceGravatar laszlocsomor2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see what the callers do with the Builder - remove add* methods that add a single argument followed by a list of other elements (or a joined string of them); these had a bug in that they didn't check if the collection was empty (only that it was not null), and if it was empty then the single argument was still added though it was not followed by any value - fix call sites of add* methods where we previously could have added a flag with an empty collection - audit every affected call site RELNOTES: none PiperOrigin-RevId: 161957521
* Detect one version violations while building android_binary targetsGravatar Googler2017-07-14
| | | | PiperOrigin-RevId: 161910195
* Remove all non-essential call sites of methods on Jvm.Gravatar lberki2017-07-07
| | | | | | | This is so that we can eventually route the information it now contains through JavaRuntimeProvider. RELNOTES: None. PiperOrigin-RevId: 161196809
* Plumb some information about the location of the JVM through ↵Gravatar lberki2017-07-07
| | | | | | | | | | | | | | | JavaRuntimeProvider instead of Jvm if a java_runtime rule is used. There are a few things standing in the way of removing package loading from JvmConfigurationLoader: - The JAVABASE/JAVA Make variables, which are a function of the contents of the package with the JVM. The plan is to make JavaRuntime a MakeVariableProvider and add an attribute to rules that do Make variable evaluation to tell which Make variables they need - The path to the Java binary is exported to Skylark through the configuration fragment. We'll need to export an attribute to Skylark that can be used to depend on the JVM, then do the three-step dance to use that instead of the configuration and figure out what to do if --javabase is not a label. - Jvm#getJavaExecutable() has a bunch of call sites. They need to be adjusted individually. RELNOTES: None. PiperOrigin-RevId: 161176462
* Remove JavaIdeInfoProvider.Gravatar dslomov2017-07-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 161086496
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Create a general WrappingProvider concept and use for java_proto_library and ↵Gravatar Googler2017-06-20
| | | | | | | | | | | | friends. The wrapping provider contains its own provider map containing any providers that may conflict. This can be used generally for any aspect that wants to override its base providers (during migration), and due to the generality we should be able to cut down on code size and complexity. Once we have this, we can more easily and uniformly bind aspects to Skylark for aspect-on-aspect functionality. The Skylark providers can be instantiated with a wrapping provider if one is present, or fall through to the base target if they aren't. We will also likely save a bit of memory from cutting down on wrapping classes. PiperOrigin-RevId: 159461325
* Roll forward R generation for Robolectric behind a flag to enable testingGravatar Googler2017-06-19
| | | | | RELNOTES: none PiperOrigin-RevId: 159263527
* Automated g4 rollback of commit 5c2dc673a3ad2aa52f25c6f7d767671ba3e9b02c.Gravatar corysmith2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Appears that the generated R classes are not correct, causing test failures. *** Original change description *** Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c. *** Reason for rollback *** Rolling forward with the generated resources directory being created for tests without resources. *** Original change description *** Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b. *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependen... *** RELNOTES: None PiperOrigin-RevId: 159032530
* Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c.Gravatar corysmith2017-06-13
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the generated resources directory being created for tests without resources. *** Original change description *** Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b. *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependency libraries with resources in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 158756991
* Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b.Gravatar lpino2017-06-07
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependency libraries with resources in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 158159550
* Generate pre-reconciled ids R classes for dependency libraries with resourcesGravatar corysmith2017-06-02
| | | | | | | in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 157762190
* Automated g4 rollback of commit e2edf2e141a09c025a958d580c7cac7b57c70d83.Gravatar Googler2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix. *** Original change description *** Automated g4 rollback of commit c78c947e6a8cbb323304f872a3dcabb989a3d76b. *** Reason for rollback *** Breaks android targets in the nightly - see [] *** Original change description *** Do not retain transitive data in AndroidLocalTestBase... *** ROLLBACK_OF=156745610 RELNOTES: None PiperOrigin-RevId: 157028029
* Add one version enforcement to android_robolectric_testGravatar Googler2017-05-26
| | | | | RELNOTES: add one-version enforcement to android_local_test PiperOrigin-RevId: 157014802
* Automated g4 rollback of commit c78c947e6a8cbb323304f872a3dcabb989a3d76b.Gravatar cpeyser2017-05-23
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks android targets in the nightly - see [] *** Original change description *** Do not retain transitive data in AndroidLocalTestBase. The argument strings and artifacts were both transitive and flattened, causing O(N^2) memory consumption. PiperOrigin-RevId: 156745610
* Do not retain transitive data in AndroidLocalTestBase.Gravatar Googler2017-05-15
| | | | | | The argument strings and artifacts were both transitive and flattened, causing O(N^2) memory consumption. PiperOrigin-RevId: 156083738
* Introduce a base class for AndroidLocalTest, AndroidLocalTestBase. This is a ↵Gravatar Googler2017-04-30
first step for future Bazel android_local_test rule support. RELNOTES: None PiperOrigin-RevId: 154562617