aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Add a test to ensure that the AndroidManifest.xml from an aar_import isGravatar ajmichael2017-08-28
| | | | | | | exported. RELNOTES: None PiperOrigin-RevId: 166546091
* Refactoring: OptionsParser now uses the visitor pattern to iterate over ↵Gravatar fwe2017-08-28
| | | | | | | | | Blaze options. This change is in preparation for unknown commit which also needs to iterate over all options, but has to execute a different action than getOptionsCompletion(). As a result, applying the visitor patterns helps to avoid duplicate iteration code. PiperOrigin-RevId: 166515117
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-28
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166509298
* Make tests independent of the current state of the ↵Gravatar vladmos2017-08-28
| | | | | | incompatible_descriptive_string_representations flag PiperOrigin-RevId: 166475260
* Implement field declarations for declared providers.Gravatar dslomov2017-08-25
| | | | | RELNOTES: Skylark providers can specify allowed fields and their documentation. PiperOrigin-RevId: 166446104
* Automated rollback of commit 1af9b1e2238c3b43a2b66233495ecf7b6ef4dcab.Gravatar Googler2017-08-25
| | | | | | | | | | | | *** Reason for rollback *** Reason for previous rollback was identified as being a memory regression causing some cases to hit java heap limit. Proposal is to increase java heap limit to compensate and just go with the original change. *** Original change description *** Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b. PiperOrigin-RevId: 166426608
* Adds -p to zipalign invocation to align stored (not compressed) .so files in ↵Gravatar ahumesky2017-08-25
| | | | | | | apks on memory page boundaries. RELNOTES: .so files in APKs will be memory-page aligned when android_binary.nocompress_extensions contains ".so" and --experimental_android_use_nocompress_extensions_on_apk is specified. PiperOrigin-RevId: 166399337
* Enable using a parameter for large lists of resources to link.Gravatar corysmith2017-08-25
| | | | | RELNOTES: None PiperOrigin-RevId: 166379334
* Busybox all the Bazel Android tools.Gravatar ajmichael2017-08-25
| | | | | | | | | This change reduces the size taken up in the bazel binary by Android tools deploy jars from 38.2 mb to 9.8 mb, which is 15% of the bazel binary size. Also, some minor cleanups of our BUILD files. https://github.com/bazelbuild/bazel/issues/2385 RELNOTES: None PiperOrigin-RevId: 166373241
* Naming style fix for AndroidInstrumentationInfo(Provider).Gravatar dslomov2017-08-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 166368143
* Refactor JavaInfo.Gravatar dslomov2017-08-25
| | | | | | | | | | Convert implementation from populating an immutable map to a set of SkylarkCallables. That saves memory and allows specifying documentation. Also properly implements equals() and hashCode(). RELNOTES: None. PiperOrigin-RevId: 166364059
* Allow CommandLine expansion to throw an exception.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | | | | | | | This paves the way for Skylark-side compact command lines that can fail during expansion. In general, expansion happens in these scenarios: * Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions. * In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory. * Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient. * Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient. For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future. RELNOTES: None PiperOrigin-RevId: 166266385
* Check at compile time that all options are declared public, and are ↵Gravatar ccalvarin2017-08-24
| | | | | | | | non-final and non-static. Remove the now redundant check in the testing framework, as the cases being tested no longer compile. Keep tests that check the contents of the OptionsBase as a whole, however, as this is still not being tested at compile time. PiperOrigin-RevId: 166239209
* Add resource filtering support for third pseudolocaleGravatar Googler2017-08-24
| | | | | | | | Apparently, there's a third pseudolocale, en-rXC. Add support for it in ResourceFilter. RELNOTES: none PiperOrigin-RevId: 166238886
* Stop using CustomMultiArgv in ProtoCompileActionBuilder.Gravatar tomlu2017-08-24
| | | | | | CustomMultiArgv is hard to serialise. This CL still uses mapping functions, which are equally hard to serialise, but it moves one step closer to being structural. PiperOrigin-RevId: 166230153
* Pull maven -src jars when available alongside jars re:Gravatar juliexxia2017-08-24
| | | | | | | https://github.com/bazelbuild/bazel/issues/308 RELNOTES: None. PiperOrigin-RevId: 166219871
* Final tweaks and fixes to enable aapt2 for Blaze.Gravatar corysmith2017-08-24
| | | | | | | Implemented processing databinding for compile passes RELNOTES: None PiperOrigin-RevId: 166215052
* Store content digests in repository marker files. ↵Gravatar Benjamin Peterson2017-08-24
| | | | | | | https://www.bazel.build/designs/2016/10/18/repository-invalidation.html Change-Id: I6cb01397a35cd32169a0e415f8d7f944e7d840df PiperOrigin-RevId: 166200841
* Refactor: Parse return statements without an expression properlyGravatar fzaiser2017-08-24
| | | | | | | | This is an internal refactoring necessary for the Skylark linter. It does not change any behavior. RELNOTES: None PiperOrigin-RevId: 166199367
* Adds compile action for aapt2: Aapt2ResourcePackagingActionGravatar corysmith2017-08-23
| | | | | | | | Adds a ManifestContainer interface to centralize the types that provide manifests. Adds PackagedResources to represent a linked dexless resource apk RELNOTES: None PiperOrigin-RevId: 166193049
* Minor refactor of UserDefinedFunction constructor, accessorsGravatar brandjon2017-08-23
| | | | | RELNOTES: None PiperOrigin-RevId: 166149340
* Remove unnecessary custom android_sdk from apksigner tests.Gravatar ajmichael2017-08-23
| | | | | RELNOTES: None PiperOrigin-RevId: 166147838
* Move AarImportTest into the proper package.Gravatar ajmichael2017-08-23
| | | | | RELNOTES: None PiperOrigin-RevId: 166071758
* Remove dialect distinction from the parser.Gravatar laurentlb2017-08-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 166058718
* Split Info into SkylarkInfo and NativeInfo.Gravatar dslomov2017-08-22
| | | | | | | | Prerequisite to implementing shape-declaration and shape-sharing for declared providers, and cleaning up NativeInfo interface. RELNOTES: None. PiperOrigin-RevId: 166057070
* Add OptionDefinition layer between the @Option annotation and its fields and ↵Gravatar ccalvarin2017-08-22
| | | | | | | | | | | the options parser. Removes any direct reads of the annotation outside of OptionDefinition. This allows for fewer manual checks for the annotation's existence, unifies error wording, and paves the way for potentially generifying the OptionsParser to accept different @Option-equivalent annotations. Also allows for cleanup of duplicate code by giving @Option-specific operations a clear home, such as sorts and default logic. In followup changes, we can eliminate some unnecessarily complex caching by instead memoizing values in the OptionDefinition. This will have the positive side effect of making sure reads come from the cached values. RELNOTES: None. PiperOrigin-RevId: 166019075
* Remove FeaturePolicyConfiguration et al. in favor of the new Whitelisting.Gravatar mstaib2017-08-22
| | | | | | | | This migrates the config_feature_flag implementation over and removes the old flag (which was not used except to test it). Fare thee well, old flag. RELNOTES: None. PiperOrigin-RevId: 165995681
* Change some apple_static_library tests so they work forGravatar cpeyser2017-08-22
| | | | | | --experimental_objc_crosstool=all. PiperOrigin-RevId: 165966924
* Improve CustomCommandLine interface.Gravatar tomlu2017-08-22
| | | | | | | | | | | | | | | | In converting SpawnAction.Builder (multi-thousand line CL) users directly to CustomCommandLine I didn't like the resulting loss of readability, and the methods didn't feel very discoverable. Unless it's very convenient and readable to use CustomCommandLine, people will resort to non-memory efficient patterns by default. I'm holding that CL for this, which should offer a nicer interface. This CL removes VectorArg from the API contact surface area, instead creating 64 overloads for every valid combination of parameters. Pretty sad, but the methods dispatch straight to internal helper methods so it's mostly boilerplate to the tune of +400 LOC. Other changes: * Change ImmutableCollection -> Collection and copy the args directly into the internal args vector. Saves on collection object overhead and saves users from having to create immutable copies. * Change some names, notably add -> addAll for collection methods * Create additional missing overloads * Fix JavaDoc RELNOTES: None PiperOrigin-RevId: 165943879
* Resource filtering properly handles pseudolocalesGravatar Googler2017-08-22
| | | | | | | | | | Pseudolocalized resources are generated by aapt in response to their locales being passed to aapt. However, when filtering in analysis, we attempted to save time by not passing any filters to aapt. Fix this by passing the filters if pseudolocales were specified. RELNOTES: none PiperOrigin-RevId: 165939670
* remote: don't fail build if upload failsGravatar Benjamin Peterson2017-08-22
| | | | | | | | | | | | | | If the upload of local build artifacts fails, the build no longer fails but instead a warning is printed once. If --verbose_failures is specified, a detailed warning is printed for every failure. This helps fixing #2964, however it doesn't fully fix it due to timeouts and retries slowing the build significantly. Also, add some other tests related to fallback behavior. Change-Id: Ief49941f9bc7e0123b5d93456d77428686dd5268 PiperOrigin-RevId: 165938874
* Remove ALREADY_EXISTS special treatment from the CAS uploader. This error ↵Gravatar olaola2017-08-22
| | | | | | | | should no longer be thrown by any CAS implementations. TESTED=unit tests RELNOTES: none PiperOrigin-RevId: 165937395
* Blaze exports a feature for actions with objective c source in their transitiveGravatar cpeyser2017-08-22
| | | | | | closure. PiperOrigin-RevId: 165934905
* Rename some of native declared providers according to the new naming scheme.Gravatar dslomov2017-08-21
| | | | | RELNOTES: None PiperOrigin-RevId: 165910455
* Throw a static error when lvalue of an augmented assignment is a list.Gravatar laurentlb2017-08-21
| | | | | | | RELNOTES: When the lvalue of an augmented assignment is a list, we now throw an error before evaluating the code (e.g. `a, b += 2, 3`). PiperOrigin-RevId: 165906611
* Replace TransitionApplier interface with a dedicated class.Gravatar gregce2017-08-21
| | | | | | | | | | | | | | | This accomplishes a few goals: 1. Removes the outdated BuildConfiguration.StaticConfigurationApplier code. 2. Removes the TransitionApplier abstraction completely. This was an awkward bridge meant to support both static and dynamic implementations. 3. Moves transition logic to its own dedicated class: ConfigurationResolver. This no longer belongs in BuildConfiguration, which we ultimately want to become a simple <key, value> map. Part of the static config cleanup effort. PiperOrigin-RevId: 165736955
* Remove CustomArgv. It is unused.Gravatar tomlu2017-08-21
| | | | PiperOrigin-RevId: 165731260
* j2objc java tests work for --experimental_objc_crosstool=allGravatar cpeyser2017-08-21
| | | | PiperOrigin-RevId: 165730337
* Refactor Bash LauncherGravatar Yun Peng2017-08-21
| | | | | | | | | | | | | | | | | | 1. Extract some funtions into NativeLauncherUtil.java So that they can also be used by Python and Java launcher. 2. Derive runfiles directory from mainExectuable yielding "%{name}.cmd.runfiles" or "%{name}.exe.runfiles" 3. Removed bash_main_file key, we can assume the main file is next the launcher just without .exe suffix. By doing this, we don't have to worry about passing RunfilesPath or ExecPath. RunfilesPath has ../ prefix for external file, ExecPath contians ./bazel-out/... for generated file. If main file is a generated file from external repository, neither of them are correct. Change-Id: Ie0c35f6030f6229c28d935d8fb3cb6a8af5af29c PiperOrigin-RevId: 165699975
* Remove BuildConfiguration.useDynamicConfigurations.Gravatar gregce2017-08-18
| | | | | | | | This is always true. Part of the static config cleanup effort. PiperOrigin-RevId: 165628823
* Properly handle some values that can be null in AppleCommandLineOptions.Gravatar janakr2017-08-18
| | | | PiperOrigin-RevId: 165622047
* Add Skylark flags as common command optionsGravatar brandjon2017-08-18
| | | | | | | | | This makes these flags accessible to all commands, including some that don't do anything with Skylark (e.g. canonicalize-flags). This leads to spammier help messages. But the benefit is that it allows them to appear on a "common" line in the .bazelrc. Fixes #3538. RELNOTES: Skylark-related options may now appear as "common" command options in the .bazelrc PiperOrigin-RevId: 165620829
* Remove ConfigurationCollection{Function,Value}, ↵Gravatar gregce2017-08-18
| | | | | | | | BuildConfigurationCollection.Transitions. Part of the static config cleanup effort. PiperOrigin-RevId: 165607492
* Desugar all the Android builds!Gravatar ajmichael2017-08-18
| | | | | | | | | Also, promote --experimental_desugar_for_android to --desugar_for_android. Fixes https://github.com/bazelbuild/bazel/issues/2871 RELNOTES: All Android builds now use the desugar tool to support some Java 8 features by default. To disable, use the --nodesugar_for_android flag. PiperOrigin-RevId: 165606988
* Remove RuleClass.Configurator and obsolete LIPO_ON_DEMAND uses.Gravatar gregce2017-08-18
| | | | | | | | Dynamic configs use RuleTransitionFactory instead. Part of the static config cleanup effort. PiperOrigin-RevId: 165590679
* Fix expansion option output formatting in html outputGravatar ccalvarin2017-08-18
| | | | | | Like the terminal output, there was some discrepancy between the expansion function and static expansion behavior. Also adds html usage output tests. PiperOrigin-RevId: 165584454
* Open-source Skyframe serialization, and make AppleConfiguration serializable ↵Gravatar janakr2017-08-18
| | | | | | as a pilot. Currently not hooked up to anything, but will be shortly. PiperOrigin-RevId: 165583517
* Remove ConfigurationCollectionFactory as part of the static config cleanup.Gravatar gregce2017-08-18
| | | | PiperOrigin-RevId: 165578449
* Add the workspace name to the sandbox path for sandboxed workers.Gravatar philwo2017-08-18
| | | | PiperOrigin-RevId: 165571541
* CommandBuilder.java: Don't quote the last argument when passing Windows ↵Gravatar pcloudy2017-08-18
| | | | | | | | | command to CMD.EXE. Fix https://github.com/bazelbuild/bazel/issues/2040#issuecomment-322980147 RELNOTES: None PiperOrigin-RevId: 165562681