aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com
Commit message (Collapse)AuthorAge
* 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
* Turn off checking for filegroup "data" attributes.Gravatar cpovirk2017-07-20
| | | | | | Evidently the blanket disabling for all "data" attributes doesn't apply there. PiperOrigin-RevId: 162602015
* Automated rollback of commit 01ddfb7bf418b371859de62f4eab2f41ea9a4a4a.Gravatar laszlocsomor2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial rollback. I restored the old flags (with PathListConverter), added the new ones, added deprecation warnings and annotations, and added code to concat the values of new and old. Existing released versions of Bazel should keep working with the new code until 2018-01-31, i.e. for the next ~6 months. After that I'll remove the old flags and the PathListConverter. *** Reason for rollback *** Fixed broken integration with release Blaze. *** Original change description *** Automated rollback of commit 5752463ece84ebb4fb074888cba57412ab8d86b3. *** Reason for rollback *** Broke too many targets. *** RELNOTES: none PiperOrigin-RevId: 162587548
* Deprecate dynamic config OFF and NOTRIM_PARTIAL modes.Gravatar gregce2017-07-20
| | | | | | | | | | | | | --experimental_dynamic_configs=off --experimental_dynamic_configs=notrim_partial are now aliases for --experimental_dynamic_configs=notrim (the default). Also remove outdated --nodistinct_host_configuration warning. PiperOrigin-RevId: 162549307
* Reduce to one SequencedSkyframeExecutor#create method. The others were minor ↵Gravatar janakr2017-07-20
| | | | | | convenience methods that didn't (IMO) carry their weight. PiperOrigin-RevId: 162528716
* Add test framework for OptionsBase classes and their Converters.Gravatar mstaib2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because OptionsBase implements equals() as a final method, subclasses can only add fields in certain ways for OptionsBase to properly obey equals() semantics. Specifically, all fields must be public and @Option annotated. The OptionsTester checks for these two things. Additionally, Converters must make sure to always return equals() values on equals() (or equivalent) input. The OptionsTester includes a check that all Converters named by the OptionsBase subclass being tested have matching ConverterTesters, and if valid default values are specified (i.e., on Options which are not multi-valued or default null), that these defaults are among the values tested by the ConverterTesters. The ConverterTesters themselves are wrapped EqualsTesters, testing that the output of a Converter obeys equals() as expected for the same input (or equivalent ones), and is consistent across calls to the same Converter instance or different Converter instances. Between these two, OptionsBase subclasses can have reasonable certainty that two instances of themselves which were parsed equally - or underwent equivalent transformations - will be equal. This does not actually test any OptionsBase subclasses or Converter implementations; it merely adds a framework. Future changes will cover automatically testing all of the OptionsBase subclasses in a RuleClassProvider, but naturally, this requires writing test data for each Converter in the Bazel codebase first. RELNOTES: None. PiperOrigin-RevId: 162522445
* Refactor TargetPatternPhaseFunctionGravatar ulfjack2017-07-19
| | | | | | | | - Make TargetPatternPhaseKey implement SkyKey - Move the TargetParsingCompleteEvent posting into the function - Split the time reporting out into TargetParsingPhaseTimeEvent PiperOrigin-RevId: 162475743
* Fix sandboxing when spawn outputs differ from action outputs.Gravatar Benjamin Peterson2017-07-19
| | | | | | | | | | | | TestRunner actions are special because their action outputs are different from their spawn outputs. If there's a spawn output that's not an action output, SymlinkExecroot can't rely on the parent directories for that output existing in the real execroot. Thus, copyOutputs() must ensure the real execroot has the relevant ancestral directories before copying the output over. Change-Id: I84fd69cd51628c51de9c8993b6a4407bbff038a0 PiperOrigin-RevId: 162470058
* Fix a bunch of test cases that break if genfiles == bin.Gravatar lberki2017-07-19
| | | | | | | A few are left, but they will require actual code changes (as opposed to changes to test cases only) RELNOTES: None. PiperOrigin-RevId: 162453092
* Open source j2objc tests.Gravatar cpeyser2017-07-19
| | | | PiperOrigin-RevId: 162411695
* Turn on objc crosstool use in Bazel by default.Gravatar cpeyser2017-07-19
| | | | PiperOrigin-RevId: 162388184
* Split invocation policy from the optionsparser target.Gravatar ccalvarin2017-07-19
| | | | | | //src/main/java/com/google/devtools/common/options:options is now free of bazel protos, once again. PiperOrigin-RevId: 162385612
* Now that SkyKey is an interface, accept Iterable<? extends SkyKey>Gravatar ulfjack2017-07-19
| | | | | | | A subsequent CL makes TargetPatternKey implement SkyKey, and it's much nicer if I can pass lists of TargetPatternKey to the various Skyframe APIs. PiperOrigin-RevId: 162359843
* Implement toolchain resolution via constraint checks.Gravatar John Cater2017-07-19
| | | | | | | Part of #2219. Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d PiperOrigin-RevId: 162359389
* Add --extra_toolchains flag to register additional toolchain labels.Gravatar John Cater2017-07-19
| | | | | | | Fixes https://github.com/katre/bazel/issues/4. Change-Id: I664aaeb0d2aa4f36ecd0f1a5f13b5d7f25dcc8d6 PiperOrigin-RevId: 162355466
* Don't differentiate genfiles and bin in artifactsToStrings().Gravatar lberki2017-07-19
| | | | | | | This fixes the majority of Java test failures with --noexperimental_separate_genfiles_directory . RELNOTES: None. PiperOrigin-RevId: 162350591
* CustomCommandLine: add emptiness checksGravatar laszlocsomor2017-07-19
| | | | | | | | | | | | | | | | | | | | | This is a semantic roll-forward of https://github.com/bazelbuild/bazel/commit/a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c which was rolled back in https://github.com/bazelbuild/bazel/commit/33cd68e18f554b98194b4ce924580d3333ab9217 due to memory regressions. In this commit: - add @Nullable annotations to CustomCommandLine.Builder.add* methods where it makes sense - add Preconditions.checkNotNull for non-nullable arguments - add emptiness checks for Iterables in add(String, Iterable) style methods, to avoid adding the argument when the Iterable is empty and so the argument would not be followed by any values RELNOTES: none PiperOrigin-RevId: 162349842
* Report error when action_config for given C++ compile action is not definedGravatar hlopko2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162344071
* Add more unit tests for java_common.create_provider.Gravatar elenairina2017-07-19
| | | | PiperOrigin-RevId: 162336470
* Move ParsingFailureEvent reporting to TargetPatternFunctionGravatar ulfjack2017-07-18
| | | | | | | We're parsing the target pattern before we create the SkyKey, so all callers of the key creation also need to report this event. PiperOrigin-RevId: 162326973
* Add an undocumented option to remove the separation between the bin and ↵Gravatar lberki2017-07-18
| | | | | | | genfiles directories. RELNOTES: None. PiperOrigin-RevId: 162325236
* Fix Postable forwarding and replayGravatar ulfjack2017-07-18
| | | | | | | We were previously duplicate-posting Postable events posted to the Skyframe environment. PiperOrigin-RevId: 162323598
* 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
* Add testing for builds which contain two targets with different minimum_os ↵Gravatar cparsons2017-07-18
| | | | | | | but same sources RELNOTES: None. PiperOrigin-RevId: 162295421
* Improve attribute and index error messages for targetsGravatar vladmos2017-07-18
| | | | | | | Instead of "object of type 'Target'" a representation of the target can be used for improved readability. PiperOrigin-RevId: 162267961
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Dynamic transitions for controlling resource filteringGravatar Googler2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamically Configured Resource Filtering change 4/6 Add dynamic transitions for controlling resource filtering. These transitions will be called in the next few reviews. Specifically, one transition turns dynamically configured resource filtering on, and updates the dynamically passed resource filter to contain the current target's resource filtering settings. The other turns off dynamic filtering, including removing all filtering settings and transitioning to FilterBehavior.FILTER_IN_ANALYSIS. We apply the appropriate transition in getTopLevelPatchTransition: if dynamic filtering was not requested, no transition is made; if dynamic filtering was requested but would not be appropriate (either because multiple top-level targets would mean dynamic configuration would probably split the build graph, or because no resource filters were provided so dynamically propagating them would be a waste of time) we transition to static filtering, and, otherwise, we continue to use dynamic filtering but preserve the current target's filtering settings so they can be passed to its dependencies. These transitions will actually be called in the next review. RELNOTES: none PiperOrigin-RevId: 162209042
* Remove ParseFailureListener in favor of posting to EventBus directlyGravatar ulfjack2017-07-18
| | | | | | | We now have the ExtendedEventHandler, which is available in all the relevant code paths, so we just post the event directly. PiperOrigin-RevId: 162200923
* Automated rollback of commit 4594b7fd6c2516341cdd6e57f9eaaf22cf691f95.Gravatar buchgr2017-07-17
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** It breaks examples/tutorial on ci.bazel.build [1] with error: object of type 'Target' has no field 'objc'. [1] http://ci.bazel.io/view/Dashboard/job/Tutorial/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/1023/console *** Original change description *** AppleBinary and AppleStaticLibrary no longer propagate unwrapped ObjcProvider. This will prevent dependencies on apple_binary and apple_static_library from objc_library and other lower-level rules. RELNOTES: None. PiperOrigin-RevId: 162195726
* Internal changeGravatar Googler2017-07-17
| | | | PiperOrigin-RevId: 162194755