aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Remove old intellij aspect code bundled with BazelGravatar Googler2017-07-31
| | | | PiperOrigin-RevId: 163538636
* Expose to Skylark Strings instead of PathFragments from CppConfiguration.Gravatar dslomov2017-07-31
| | | | | | | | | | The only way to use those was in the `ctx.action(...executable...)` parameter, made that accept string. Fixes #2931. RELNOTES: None. PiperOrigin-RevId: 163511248
* Provide a lambda interface for custom mock rule class behavior.Gravatar gregce2017-07-31
| | | | | | | | | | This extends the "easy use" idea of MockRule from just custom attributes to full-on custom behavior. For a proof of concept, also port Bazel's late-bound attribute tests. PiperOrigin-RevId: 163483121
* Remove the type data from ToolchainInfo, it is reduntant with ↵Gravatar John Cater2017-07-31
| | | | | | | | | DeclaredToolchainInfo. Fixes #3458. Change-Id: I24dd6d9d24432b9aaf0229de658f07e465ad63cb PiperOrigin-RevId: 163466882
* Use dynamically configured resource filteringGravatar Googler2017-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually hook up the resource filtering configuration transitions to AndroidConfiguration's topLevelConfigurationHook. Dynamic configuration is inefficient when multiple configurations are used. Multiple configurations result in splitting the build graph and duplicating work. To avoid using multiple configurations as much as possible, dynamically configured resource filtering will only be applied for top-level android_binary targets. When android_binary targets are included as dependencies, it's very likely that multiple binaries with many shared dependencies but different configurations would be used. Only applying dynamic filtering to top-level binaries removes this concern. It is still possible to build multiple top-level binary targets with different configurations at once. Previous versions of this code considered not using dynamic configuration in that case as well, but that raised some unanswered questions about whether Bazel's invariants should allow modifying one target's configuration based solely on targets that happen to be building in parallel. As a result, that optimization is not included for now; we assume that developers manually building multiple similar binaries at once is relatively rare (plus, dynamically configured resource filtering in general is not turned on by default and will not be turned on by default until we're confident the benefits outweigh the costs). RELNOTES: none PiperOrigin-RevId: 163464415
* Apply native binary launcher to sh_binaryGravatar Yun Peng2017-07-31
| | | | | | | | | | | | This change: 1. Added launcher to @bazel_tools If the host platform is Windows, we use a prebuilt launcher.exe , otherwise the launcher needs to be built with MSVC first. 2. Launching sh_binary using native launcher. Change-Id: I5a63135455057fbfe04ff0cce7ec7994ef0c347a PiperOrigin-RevId: 163442540
* Assert that declared providers are not TransitiveInfoProviders.Gravatar dslomov2017-07-28
| | | | | | | Also fix the remaining violations. RELNOTES: None. PiperOrigin-RevId: 163391215
* Fix confusing semantics for Attribute.Builder.allowedRuleClasses.Gravatar gregce2017-07-28
| | | | | | | | | | 1) Update the javadocs. 2) Clarify that allowedRuleClases and allowedRuleClassesWithWarning must be disjoint sets. 3) Enforce 2). 4) Fix error messaging when only "with warnings" is set. PiperOrigin-RevId: 163379567
* Remove MetadataHandler.isRegularFileGravatar ulfjack2017-07-28
| | | | | | | Instead use MetadataHandler.getMetadata().isFile(), which is basically what isRegularFile did before. PiperOrigin-RevId: 163351014
* Make all WithLegacySkylarkName providers declared providers.Gravatar dslomov2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163343931
* Add missing test dependency to unbreak the buildGravatar Jakob Buchgraber2017-07-27
| | | | | | | Introduced by b344e2c5a97b0eeacb796db20bb894f21283d358 Change-Id: I942b63cd52520a37e5bf2c7b04f3eed1615ec71e PiperOrigin-RevId: 163323682
* Fix a crash when Skylark rule re-exports SkylarkApiProvider.Gravatar dslomov2017-07-27
| | | | | | | | Also PintoSourcesContextProvider should not be a SkylarkApiProvider: it is not facade for anything but a provider in its own right. RELNOTES: None. PiperOrigin-RevId: 163323130
* remote: Don't upload failed action to cache. Fixes #3452Gravatar Jakob Buchgraber2017-07-27
| | | | | | | Also, restructure the code for better read- and testability. Change-Id: Ibdd0413f89e4687b836b768a9e7d6315234cb825 PiperOrigin-RevId: 163322658
* Fixing #3380: output stack traces and informative messages.Gravatar olaola2017-07-27
| | | | | | | | Also added tests specifically for the output, to ensure we don't break it again. TESTED=remote worker, unit tests RELNOTES: fixes #3380 PiperOrigin-RevId: 163283558
* Define an outgoing rule transition interface.Gravatar gregce2017-07-27
| | | | | | | | | | This lets a parent choose a transition for its dep based on the dep's rule class. Implement (experimental) dynamic Android resource filtering trimming with this. PiperOrigin-RevId: 163259052
* Resource filtering should preserve all matching artifacts, despite shared namesGravatar Googler2017-07-27
| | | | | | | | | | | | | | | | | | Before this change, density-based resource filtering tracked resources by qualifiers and name. Resources with density qualifiers specified would go into this code, but only one resource would be chosen from each each (qualifier, name) pair. Instead, track the resource using its entire path, this tracking resources with the same name seperately. Also, in case multiple resource are passed to the resource processing action, resource filtering only ignores a file if its name was in the list of resources to ignore *and* it does not exist. Otherwise, legitimate resources with the same name as a filtered resource might be ignored. RELNOTES: none PiperOrigin-RevId: 163235681
* Automated rollback of commit 9e3018109b189a345cd9b353729c7f31ac209bc9.Gravatar allevato2017-07-27
| | | | | | | | *** Reason for rollback *** Broke bundling of objc_frameworks. PiperOrigin-RevId: 163215950
* Package whitelisting: New implementation for feature whitelistingGravatar plf2017-07-26
| | | | | | | | This builds on top of mstaib's idea to use package groups to whitelist projects which can use certain features in the analysis phase. Instead of using configurations and a flag, this way of implementing whitelists requires using two helper methods, one that adds an implicit attribute to every rule that has functionality that must be whitelisted and a different method to check whether a given package is whitelisted to use that feature. RELNOTES:none PiperOrigin-RevId: 163200890
* Add --toolchain_resolution_debug option to give more information aboutGravatar John Cater2017-07-26
| | | | | | | | | toolchain selection. Fixes #3431. Change-Id: Ia38415575b6a121cbb6a028bfc0276691cd11b6d PiperOrigin-RevId: 163196646
* Remove --experimental_dynamic_configs=notrim_partial.Gravatar gregce2017-07-26
| | | | | | Part of the static configuration removal cleanup. PiperOrigin-RevId: 163130922
* Add the android.jar to the validate and link step for aapt2.Gravatar corysmith2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163126457
* Rollforward of "AppleBinary and AppleStaticLibrary no longer propagate ↵Gravatar cparsons2017-07-26
| | | | | | | unwrapped ObjcProvider." after skylark rule fixes. RELNOTES: None. PiperOrigin-RevId: 163121697
* Create standardized interfaces for mock rule class creation.Gravatar gregce2017-07-26
| | | | | | | | | | | | | Generally speaking, it should be as easy as possible to create custom rule classes in tests. Aside from the tests that *need* this, this also helps disentangle traditional tests from the implementation logic of predefined rules. This nudges us further forward toward the paradigm of Bazel as "build execution engine" with all rule implementations (and tests) in Skylark. PiperOrigin-RevId: 163114414
* macOS link actions set the correct system framework include pathsGravatar cparsons2017-07-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 163114020
* Refactor augmented assignment and lvaluesGravatar brandjon2017-07-26
| | | | | | | Also fix minor bug where a[b] += c would evaluate b twice. RELNOTES: None PiperOrigin-RevId: 163103618
* Generalize some of methods in TargetPattern, PrepareDepsOfPatternValue, and ↵Gravatar nharmata2017-07-26
| | | | | | | RecursivePackageProvider dealing with the concept of "excluded directories". RELNOTES: None PiperOrigin-RevId: 163074794
* Make --experimental_use_parallel_android_resource_processing a no-op.Gravatar ajmichael2017-07-26
| | | | | | | Also, a few small cleanups of some duplicate test methods. RELNOTES: None PiperOrigin-RevId: 163066349
* Automated rollback of commit 6d884afa8da1b08288cb0108e8bbf6c22ec63393.Gravatar dslomov2017-07-25
| | | | | | | | | | | | | *** Reason for rollback *** Broke bazel_apple_rules *** Original change description *** Make all WithLegacySkylarkName providers declared providers. RELNOTES: None PiperOrigin-RevId: 163054821
* Make all WithLegacySkylarkName providers declared providers.Gravatar dslomov2017-07-25
| | | | | RELNOTES: None PiperOrigin-RevId: 163042362
* Add a command line option to make the minimum_os_version attribute mandatory ↵Gravatar lberki2017-07-25
| | | | | | | on Apple rules. RELNOTES: None. PiperOrigin-RevId: 163035922
* Add hook to process SkyframeExecutor in tests. Also add sentinel exception ↵Gravatar janakr2017-07-25
| | | | | | to indicate unserializability, improve error message in Path when serialization fails, and add some test-only methods to SkyframeExecutor and PackageFactory. PiperOrigin-RevId: 162993806
* Make $jarjar_bin point to //tools/android:jarjar_bin.Gravatar ajmichael2017-07-24
| | | | | | | Fixes TODO in AndroidRuleClasses.java. RELNOTES: None PiperOrigin-RevId: 162955052
* Move the DurationConverter to the common.options packageGravatar ulfjack2017-07-24
| | | | | | | Also change it to java.time.Duration, rather than Jodatime. Now that we're on Java 8, we no longer need Jodatime. PiperOrigin-RevId: 162917526
* Handle multiple crosstool features providing the same symbol cleanlyGravatar hlopko2017-07-24
| | | | | | | It's bad to crash with an exception, let's show proper rule error instead. RELNOTES: None. PiperOrigin-RevId: 162916138
* Extract a common AbstractSpawnStrategy parent classGravatar ulfjack2017-07-24
| | | | | | This removes a bunch of code duplication that I previously introduced. PiperOrigin-RevId: 162909430
* Make all our tests pass with --noexperimental_toolchain_id_in_output_directory.Gravatar lberki2017-07-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 162906513
* Skip tests that aren't CPU-compatible with the current build.Gravatar gregce2017-07-24
| | | | | | | | | | We don't yet have a SKIPPED test status. So for now we report "NO STATUS". Also moved top-level constraint checking to its own file, since its logic is getting more complicated. PiperOrigin-RevId: 162790879
* Add an Iterable<Event> Truth subject so that we can easily assert things on ↵Gravatar janakr2017-07-24
| | | | | | | | | | an iterable of events without calling into the heavyweight MoreAsserts. Use that in Skyframe instead of MoreAsserts. Also delete an unused method in MoreAsserts. PiperOrigin-RevId: 162754283
* Add ActionInputPrefetcher to ActionExecutionContextGravatar ulfjack2017-07-24
| | | | | | | This is more consistent with other values, and removes the need to inject it into the constructor of the various strategy implementations. PiperOrigin-RevId: 162729187
* Make error message in case top-level aspect is missing clearer.Gravatar Dmitry Lomov2017-07-24
| | | | | | | Fixes #2874. Change-Id: I636e0f6b56a1e33adfc64e90f36f76d4254d0281 PiperOrigin-RevId: 162726099
* Make all test cases pass with --noexperimental_separate_genfiles_directory.Gravatar lberki2017-07-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 162715619
* ObjcProvider is propagated as a native declared provider.Gravatar cparsons2017-07-21
| | | | | | | This has the added benefit of improving ObjcProvider documentation generated in bazel docs. RELNOTES: None. PiperOrigin-RevId: 162658384
* Move ActionInputPrefetcher to the actions packageGravatar ulfjack2017-07-21
| | | | | | The plan is to add it to ActionExecutionContext, which is also there. PiperOrigin-RevId: 162656835
* Fix #3416: catch the ALREADY_EXISTS status code on upload, and treat it as ↵Gravatar olaola2017-07-21
| | | | | | | | | success. This can happen per spec, if multiple builds try to upload the same blob concurrently. Also, added this to the RemoteWorker, per spec. PiperOrigin-RevId: 162647548
* Use toolchain resolution in rule creation.Gravatar John Cater2017-07-21
| | | | | | | Part of #2219. Change-Id: Id4929d5ddcd57b4635af5e513eb9a09f16a78e71 PiperOrigin-RevId: 162634398
* Support multiple --define's in config_setting.Gravatar gregce2017-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the problem that config_setting( name = "a_and_b", values = { "define": "a=c", "define": "b=d" }) doesn't work as expected because BUILD parsing removes duplicate dictionary keys in accordance with Pythonic behavior. Even worse, Skylark will soon enforce this more aggressively by making this an outright error. This change introduces the define_values attribute: config_setting( name = "a_and_b", values = { "normal_flag": "normal_value", }, define_values = { "a: "c", "b": "d" }) This is equivalent to "$ bazel build ... --normal_flag=normal_value --define a=c --define b=d" at the command line. Also tried to clean up some ConfigSetting naming for clarity around the different kind of flags. PiperOrigin-RevId: 162627180
* Tolerate injected nodes having deps.Gravatar janakr2017-07-21
| | | | | | | | | | We don't check explicitly that these are the only two ways, but this can happen if the error transience node is a dep of a node that's being injected, or if an injected node is an "external" file that needs to depend on an external package. The first possibility can happen if there was an IOException reading the node on the previous build. We handle the situation by just dirtying the node, not injecting it. Actual evaluation can handle the re-stat. PiperOrigin-RevId: 162622092
* Add --toolchain_resolution_override to allow specifying the toolchain for a ↵Gravatar John Cater2017-07-21
| | | | | | | | | given type. Fixes https://github.com/katre/bazel/issues/6. Change-Id: I6c6e303384277b013bdc27eb80743aa51f2fb98a PiperOrigin-RevId: 162618674
* Allow the aapt2 code paths to be enabled by either flag or attribute.Gravatar corysmith2017-07-21
| | | | | RELNOTES: None PiperOrigin-RevId: 162613289
* Skylark documentation: Replace "set" and "List" plain-text return types with ↵Gravatar fwe2017-07-21
| | | | | | links to "deptset" and "list". PiperOrigin-RevId: 162607082