aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Expose an actions provider on RuleConfiguredTarget instances.Gravatar cparsons2018-03-06
| | | | | | | | | Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint. Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon. RELNOTES: None. PiperOrigin-RevId: 188098079
* Adding async proto or text logging utility class.Gravatar olaola2018-03-06
| | | | | | | WANT_LGTM=buchgr TESTED=unit tests, 500 runs per test RELNOTES: None PiperOrigin-RevId: 188093043
* @AutoCodec File{State}Value.Gravatar janakr2018-03-06
| | | | PiperOrigin-RevId: 188085895
* Use new android_tools_defaults_jar in tests.Gravatar Adam Michael2018-03-06
| | | | | | | | | | | | | | //tools/defaults:android_jar is a synthetic target that is being replaced by the regular target @bazel_tools//tools/android:android_jar in Bazel 0.11 and later. See cf097e4. Change-Id: I2cfc38a0dcd25f43985e75b386f9f1cadec86320 RELNOTES: None Closes #4785. Change-Id: I2cfc38a0dcd25f43985e75b386f9f1cadec86320 PiperOrigin-RevId: 188080503
* Make the builtins registry thread-safeGravatar brandjon2018-03-06
| | | | | | | | | | | | | | It was previously assumed that safety wasn't needed because 1) all builtins should be registered in static initializer blocks, and 2) all retrievals should occur during Skylark evaluation, after static initialization completes. It turns out these assumptions aren't actually true (Who would've thunk it!). SkylarkActionFactory has been observed to be initialized as late as analysis time, and retrievals occur as early as constructing a PackageFactory (when scanning the native module). The failure mode is particularly ugly: Random Skylark method lookups will fail non-deterministically. This change guards against this by making the builtins registry implement a form of freezing. Before freezing, reads and writes are allowed and are synchronized. After freezing, only reads are allowed and they are unsynchronized for performance. BlazeRuntime is responsible for flipping the bit, and for ensuring classes like SkylarkActionFactory run their initialization by that point. Unit tests don't need to worry, since they just stay unfrozen and synchronized throughout. RELNOTES: None PiperOrigin-RevId: 188080136
* Do not expose platform-related providers to Skylark.Gravatar John Cater2018-03-06
| | | | | | | | | | | | This prevents both creation and access to platform providers from Skylark. This is needed so we can load platforms directly from platform-rule targets without needing a full configured target, and to effiently distinguish platform providers from non-platform providers. Change-Id: I6b61f9ee7518d5e9311232908a922596e18fe32f PiperOrigin-RevId: 188070457
* Convert a bunch of non-AutoCodec classes to use @AutoCodec: ↵Gravatar janakr2018-03-06
| | | | | | BuildConfiguration, BuildOptions, CollectTargetsUnderDirectoryValue. PiperOrigin-RevId: 188059815
* Automated rollback of commit f43df1e29765f75e02838e4139417e914b3ee812.Gravatar cparsons2018-03-06
| | | | | | | | | | | | | *** Reason for rollback *** Breaks external cc_proto_library. See https://github.com/bazelbuild/bazel/issues/4780 RELNOTES: None. *** Original change description *** Fixing issue with external j2objc protos PiperOrigin-RevId: 188041921
* Add a command line option to disallow vardef()s with three arguments.Gravatar lberki2018-03-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 188038131
* Implement support for sourceFiles parameter in JavaInfo constructor.Gravatar dbabkin2018-03-06
| | | | | RELNOTES:none PiperOrigin-RevId: 188026038
* Replace instances of XCode with Xcode which is the proper casing for the name.Gravatar Sergio Campama2018-03-06
| | | | | | Closes #4640. PiperOrigin-RevId: 188022228
* Remove cc_inc_library from bazelGravatar hlopko2018-03-06
| | | | | | | | | | | | | It shouldn't be open sourced at all, since it solves a very specific internal use case, and for external use cc_library with its includes, include_prefix, and strip_include_prefix attributes can be used to perfectly replace cc_inc_library. RELNOTES: Removed cc_inc_library, please use cc_library instead Use includes, include_prefix, and strip_include_prefix attributes of cc_library to replace the behavior of cc_inc_library with cc_library. PiperOrigin-RevId: 187991313
* Re-evaluate workspace status when clientEnv changesGravatar Justin Santa Barbara2018-03-06
| | | | | | | | | | | | We pass the clientEnv to the workspace status command, and it may use environment variables to influence status. We must therefore reevaluate the workspace status command whenever the clientEnv changes. Fixes #4222 Closes #4705. PiperOrigin-RevId: 187988847
* Also get build-runfiles as an ActionInput for the symlink tree spawnGravatar ulfjack2018-03-06
| | | | | | | This isn't strictly necessary since we disable caching and require local execution. PiperOrigin-RevId: 187985476
* @AutoCodec RepositoryName.Gravatar janakr2018-03-05
| | | | PiperOrigin-RevId: 187956593
* Serialize Path using AutoCodec.Gravatar janakr2018-03-05
| | | | PiperOrigin-RevId: 187945746
* Cache SkylarkLookupImportValues in memory so that we don't recompute them ↵Gravatar shreyax2018-03-05
| | | | | | multiple times. PiperOrigin-RevId: 187941859
* Add --experimental_fix_deps_tool flag to BazelGravatar Googler2018-03-05
| | | | | RELNOTES: None PiperOrigin-RevId: 187936071
* remote: Add interceptor for logging gRPC calls during remote execution/cachingGravatar Googler2018-03-05
| | | | | | | | | | This provides a io.grpc.ClientInterceptor implementation that can be used to log gRPC call information. The interceptor can select a logging handler to use based on the gRPC method being called (Watch, Execute, Write, etc) to build a LogEntry, which can then be logged after the call has finished. Unit tests for the interceptor are included. In this change, the interceptor is never invoked, nor are there any handlers implemented for any gRPC methods. The interceptor also never tries to log any entries. To avoid circular dependency issues (Remote library will depend on logger which depends on remote library for utils), I've factored out the utility classes from the remote library into their own directory/package as part of this change. PiperOrigin-RevId: 187926516
* Increase timeout to "long" for:Gravatar twerth2018-03-05
| | | | | | | | | | | //src/test/shell/bazel/android:android_ndk_integration_test and //src/test/shell/bazel:bazel_test_test They're timing out on Kokoro recently. RELNOTES: None PiperOrigin-RevId: 187853786
* Do not upload link inputs of the linkstamp compile actions to the executorGravatar hlopko2018-03-05
| | | | | | | | | | | | | | | | | Link inputs are there only to invalidate the action, they don't affect the execution of the compile action. This cl optimizes the action execution by not having to collect unnecessary inputs into the sandbox. Since this is CppCompileAction and nothing is easy here, let me elaborate on my assumptions. The goal of this cl is to stop passing unneeded inputs into Spawns. This is implemented by introducing a dispensableInputs field to the CppCompileAction. SpawnGccStrategy then doesn't forward these further. I'm not adding dispensableInputs to the ActionKey. I think it's enough to put them to the inputs and into the updateActionInputs method. RELNOTES: None. PiperOrigin-RevId: 187849482
* Replace LegacySkyKey by AbstractSkyKey or custom SkyKeys. AbstractSkyKey ↵Gravatar janakr2018-03-02
| | | | | | | | doesn't save memory in the 32-bit case, but makes it easier for people to see how many SkyKeys we have. There's some unnecessary interning in tests, but it was easier to copypasta and doesn't harm anything, I think. PiperOrigin-RevId: 187694309
* Fix SkylarkCallableProcessor test source package to appropriately reflect ↵Gravatar cparsons2018-03-02
| | | | | | | the directory RELNOTES: None. PiperOrigin-RevId: 187692669
* BEP: Add a --build_event_publish_all_actions flag to allow all actions to be ↵Gravatar ruperts2018-03-02
| | | | | | | published via the BEP, instead of only publishing failed actions and extra actions. RELNOTES: Add a --build_event_publish_all_actions flag to allow all actions to be published via the BEP. PiperOrigin-RevId: 187683799
* Optimize GC usage of iterating over all elements of GroupedLists when we ↵Gravatar shreyax2018-03-02
| | | | | | don't care about the group structure, and simplify the logic for prefetching old deps. PiperOrigin-RevId: 187681887
* @AutoCodec for ConfigurationTransition subclasses.Gravatar shahan2018-03-02
| | | | | | Needed for Attribute serialization. PiperOrigin-RevId: 187676061
* emulate dynamic dispatch of emulated default interface methodsGravatar kmb2018-03-02
| | | | | | RELNOTES: None. PiperOrigin-RevId: 187671513
* Add Android NDK r16 support for Bazel.Gravatar jingwen2018-03-02
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://android.googlesource.com/platform/ndk/+/ndk-release-r16/CHANGELOG.md > The deprecated headers have been removed. Unified Headers are now simply The Headers. Support for this was added in r15. > libc++ is out of beta and is now the preferred STL in the NDK. Starting in r17, libc++ is the default STL for CMake and standalone toolchains. If you manually selected a different STL, we strongly encourage you to move to libc++. For more details, see this blog post. We bind the default `//external:android/crosstool` in AndroidNdkRepositoryRule before the repository function is evaluated, so changing the default STL will affect the older NDK revisions too. Until we have a new mechanism to specify the default crosstool, users will need to use `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use `libc++`. > GCC, armeabi, mips, mip64 are deprecated but still buildable/useable. We can remove support for these in the r17 configuration. There are no other actionable differences between r15 and r16, so we can reuse the r15 configuration for r16. RELNOTES: Added Android NDK r16 support. Use --cxxopt='-std=c++11` compile with the C++11 standard, and `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use the `libc++` STL. Fixes https://github.com/bazelbuild/bazel/issues/4068 PiperOrigin-RevId: 187664390
* Add Android NDK r15 support for Bazel.Gravatar jingwen2018-03-02
| | | | | | | | | | | | | | | | | | | | | NDK15 changelog: https://android.googlesource.com/platform/ndk/+/ndk-r15-release/CHANGELOG.md Notable changes for this CL: - Clang has been updated to v5.0.300080. - android-9 is not supported anymore. Anything lower than android-14 will default to android-14. - NDK sysroot has been changed to %ndk%/sysroot - Requires additional compilation flags because the headers are now unified in a single location across archs and API levels Also removed NDK 10 checks in integration tests because it is old and we don't test against that anymore. Fixes https://github.com/bazelbuild/bazel/issues/3137 Paves the way for r16: https://github.com/bazelbuild/bazel/issues/4068 RELNOTES[NEW]: Added Android NDK r15 support, including compatibility with Unified Headers. PiperOrigin-RevId: 187648715
* Add execution platform information to the action key.Gravatar John Cater2018-03-02
| | | | | | | | | | Needed so that actions are properly invalidated and re-run when the platform's remote execution properties change. Fixes #4756. Closes #4728. Change-Id: Ia227d110c10c9aad2164cefa8a90361cc4359332 PiperOrigin-RevId: 187621349
* Allow cc_toolchain to have inline proto toolchain data, instead of using ↵Gravatar John Cater2018-03-02
| | | | | | | crosstool top. Change-Id: I531034b0c991d18b05818db4b40cbd739535b565 PiperOrigin-RevId: 187617580
* ci,windows: fix "bazel-rules-tests"Gravatar Laszlo Csomor2018-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the failing test in //src/test/java/com/google/devtools/build/lib:bazel-rules-tests on Windows. The problem was that the test setup read a resource file and assumed line endings to be "\n", but on Windows this resource file was generated with "\r\n" endings. The test setup code then put those strings into a set. Finally, the test tried to match a string in this set, but because the entries had an invisible "\r" at the end, the matching failed. This commit trims the entries before putting them in the set. Fixes https://github.com/bazelbuild/bazel/issues/4752 Closes #4754. PiperOrigin-RevId: 187608803
* Make JavaCompileAction and friends emit new-style arguments.Gravatar tomlu2018-03-01
| | | | | | | | | Instead of --direct_dependency, --indirect_dependency args we now emit --direct_dependencies. We no longer need to emit any jar owner information since that is baked into the jar by JavaBuilder. This CL also contains the deletion of CustomMultiArgv and the injecting_rule_kind aspect parameter, as the deleted code was the last remaining usage. RELNOTES: None PiperOrigin-RevId: 187558628
* Android desugar config options to exclude methods from interface emulationGravatar kmb2018-03-01
| | | | | | RELNOTES: None. PiperOrigin-RevId: 187551970
* Create --incompatible_disable_objc_provider_resources to disable deprecated ↵Gravatar cparsons2018-03-01
| | | | | | | | | objc provider skylark fields. This flag is not fully implemented -- there should also be a way to disable the provider getters using this flag, but, since @SkylarkCallable does not allow for evaluation of SkylarkSemantics, this is not yet possible. RELNOTES: None. PiperOrigin-RevId: 187542004
* Migrate a few trivial uses of @SkylarkSignature to use @SkylarkCallable insteadGravatar cparsons2018-03-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 187531006
* Introduce a specific action_config for linking nodeps dynamic librariesGravatar hlopko2018-03-01
| | | | | | | | | | | | | With this cl toolchain author can specify different flags for linking shared library produced by cc_library and a shared library produced by cc_binary. This is what is needed to remove linking_mode_flags - MOSTLY_STATIC_LIBRARIES from the crosstool. What this linking mode was used for was to separate when we link transitive shared library from cc_binary and when we link this little-and-not-really-useful-outside-of-bazel nodeps shared library in cc_library. RELNOTES: CcToolchain: Introduced action_config for "c++-link-transitive-dynamic-library" PiperOrigin-RevId: 187523334
* send invocations to emulated interfaces through dispatch helper.Gravatar kmb2018-03-01
| | | | | | | fix logic for implementing emulated interfaces. RELNOTES: None. PiperOrigin-RevId: 187520298
* Make the distinction between "global frame" and "lexical frame" explicit. As ↵Gravatar nharmata2018-03-01
| | | | | | | a nice consequence, this lets us reduce GC churn since we no longer need to create a frame instance for the lexical frame at a callsite of either a function when the environment is frozen or a builtin function (since builtins cannot modify bindings in their lexical frame). RELNOTES: None PiperOrigin-RevId: 187495787
* Fixing issue with external j2objc protosGravatar Mike Lewis2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. This seems to be a regression, so maybe should go into the 0.8.0 branch? Note: Work at Square and we have a signed CLA with google Note, without this fix we get errors like ``` ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.m' was not created ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.h' was not created ``` Closes #4058. PiperOrigin-RevId: 187480864
* Remove --incompatible_load_argument_is_label flagGravatar laurentlb2018-03-01
| | | | | | RELNOTES: Removed flag `--incompatible_load_argument_is_label`. PiperOrigin-RevId: 187479614
* Fix invocation policy's handling of the null default when filtering values.Gravatar ccalvarin2018-03-01
| | | | | | | For a filter on option values (either by whitelist, allow_values, or blacklist, disallow_values), one of the options for what to do when encountering a disallowed value is to replace it with the default. This default must be itself an allowed value for this to make sense, so this is checked. This check, however, shouldn't apply to flags that are null by default, since these flags' default value is not parsed by the converter, so there is no guarantee that there exists an accepted user-input value that would also set the value to NULL. In these cases, we assume that "unset" is a distinct value that is always allowed. RELNOTES: None. PiperOrigin-RevId: 187475696
* bazel_workspace_status_test: don't assume orderGravatar Justin Santa Barbara2018-03-01
| | | | | | | | | | | The test_errmsg test tested the behaviour when workspace_status_command was set to a file that did not exist, but other tests created a file with that name. If test_errmsg did not run first, the workspace_status_command would be valid and the test would fail. Closes #4704. PiperOrigin-RevId: 187470549
* Deprecate native git_repositoryGravatar Klaus Aehlig2018-03-01
| | | | | | | | | | | | | | The skylark implementation of git_repository is a drop-in replacement for the native workspace rule. So deprecate the latter to avoid having two implementations of the same. Also, the native rule pulls in quite some dependencies. RELNOTES: The native git_repository rule is deprecated. Use the Skylark version available via load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") instead. Change-Id: Id75d8e7b7377acd1092c4ba993f488be86c03fa0 PiperOrigin-RevId: 187466931
* Support patching of git repositories as wellGravatar Klaus Aehlig2018-03-01
| | | | | | | | | | By simply sharing the utility function. In this way, we get feature parity between git_repository and http_archive. Fixes #4676. Change-Id: I99b300e42b2f267d8d04fd965f09c24f3ae54f10 PiperOrigin-RevId: 187450644
* Respect JAVA_HOME before searching JDK under "C:/Program Files/Java"Gravatar pcloudy2018-03-01
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/4722 RELNOTES: None PiperOrigin-RevId: 187443457
* Automated rollback of commit c0e52bce8278243e8fd43f8307b413114d3ebbba.Gravatar dannark2018-02-28
| | | | PiperOrigin-RevId: 187409187
* Verifying result read with retries in the remote execute unit test.Gravatar olaola2018-02-28
| | | | | | | | The current behavior is already correct, just adding a test to make sure we retry reads as we should. TESTED=the unit test RELNOTES: None PiperOrigin-RevId: 187398578
* Deletes CODEC fields now that they are no longer needed.Gravatar shahan2018-02-28
| | | | PiperOrigin-RevId: 187397314
* Introduce an Extrema aggregator.Gravatar nharmata2018-02-28
| | | | | RELNOTES: None PiperOrigin-RevId: 187370833