aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Remove cppConfiguration from LinkBuildVariablesGravatar hlopko2018-05-08
| | | | | | | | | This is to simplify the API that will eventually be exposed to Skylark. Working towards #4571. RELNOTES: None. PiperOrigin-RevId: 195785588
* Rename LinkStaticness to LinkingMode and unify with the other LinkingMode.Gravatar hlopko2018-05-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 195777400
* Make Aar provider into NativeInfoGravatar asteinb2018-05-07
| | | | | | | This provider needs to be the new type so we can expose Aar information in Skylark RELNOTES: none PiperOrigin-RevId: 195710606
* Stop collapsing NestedSet of deps in RClassGeneratorGravatar asteinb2018-05-07
| | | | | | | This collapsing should be avoided when possible, and punted on until execution when needed. RELNOTES: none PiperOrigin-RevId: 195695290
* Add absolute path handling to Rlocation implementation used for remote ↵Gravatar Googler2018-05-07
| | | | | | | | | | | | | execution on Windows from Java launcher. Previously the test case would fail because it tried to run a path like this: C:/temp/build-1dad9dd4-ee96-40c5-b551-c8ae12461e45/bazel-out/x64_windows-fastbuild/bin/foo/foo_test.exe.runfiles/C:/openjdk/bin/java.exe Passing presubmit: https://buildkite.com/bazel/google-bazel-presubmit/builds/2558#b83dbc25-d9ad-4d49-8f78-cde9d6810741 RELNOTES: N/A PiperOrigin-RevId: 195675424
* Rename Staticness to LinkerOrArchiver.Gravatar hlopko2018-05-07
| | | | | | | | | Staticness is confusing, I always have to investigate which is Staticness and which is LinkStaticness, and even in isolation staticness is not a great name. I believe LinkerOrArchiver is a better name :) RELNOTES: None. PiperOrigin-RevId: 195674810
* Relax requirements of skylark-exposed configuration fragmentsGravatar cparsons2018-05-07
| | | | | | | Since configuration fragments will extend from build API classes, @SkylarkConfigurationField no longer needs to annotate a method defined on a @SkylarkModule class. Ideally, we would ensure that a configuration fragment with a @SkylarkConfigurationField method implements an interface with @SkylarkModule, but this seems impossible to perform at the level of an annotation processor. RELNOTES: None. PiperOrigin-RevId: 195651344
* remote/caching: improve error messages for remote cachingGravatar Jakob Buchgraber2018-05-07
| | | | | | | | Only the last commit needs to be reviewed, as it's rebased on https://github.com/bazelbuild/bazel/pull/5101 Closes #5117. PiperOrigin-RevId: 195649921
* Sort entries by segment when building a parent node to prevent unordered ↵Gravatar James Judd2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory structures. When building a parent node from action inputs, the paths to the files are sorted. These paths are then broken down into segments and a tree structure is created from the segments. Problem is, the segments at each level of the tree structure are not sorted before they are added to the parent node. This can result in an unordered directory tree. For example, the sort order of this list of files ``` /foo/bar-client/bar-client_ijar.jar /foo/bar/bar_ijar.jar ``` is maintained when it becomes a tree structure ``` foo -> bar-client -> bar-client_ijar.jar bar bar_ijar.jar ``` which is out of order. Resolves: #5109 Closes #5110. PiperOrigin-RevId: 195649710
* More detach context that was attachedGravatar Googler2018-05-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 195586974
* Emit jdeps.proto when checking the dependencies of aar_import targets.Gravatar cnsun2018-05-04
| | | | | RELNOTES: none. PiperOrigin-RevId: 195497740
* Always detach context that was attachedGravatar Googler2018-05-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 195486038
* Migrate j2objc to only support java_proto_library.Gravatar tomlu2018-05-04
| | | | | | | | | Mostly this is removing a needless restriction on proto_library to have java_api_version and j2objc_api_version set. The rest was already working. Tons of tests had to be updated. RELNOTES: None PiperOrigin-RevId: 195450685
* Add a module collecting the results of repository rulesGravatar Klaus Aehlig2018-05-04
| | | | | | | | | | | We allow repository rules to return a reproducible version of themselves, or a list of fully reproducible rules they expand to. Add a module collecting all those answers, logging them at each invocation, if requested; this collection can also be used by the upcoming 'sync' command to generate a WORKSPACE.resolved file. Change-Id: Iac1358de1b74633810d300ba2bf45bba8b3992dc PiperOrigin-RevId: 195427096
* Serialization of NestedSet<NestedSet> with NestedSetCodecWithStore waits onGravatar cpeyser2018-05-03
| | | | | | backend writes for inner NestedSet serialization. PiperOrigin-RevId: 195294676
* Allow banning symlink action outputs from being uploaded to a remote cache.Gravatar Benjamin Peterson2018-05-03
| | | | | | | | | | | | | | | | | | | This is mostly a roll-forward of 4465dae23de989f1452e93d0a88ac2a289103dd9, which was reverted by fa36d2f48965b127e8fd397348d16e991135bfb6. The main difference is that the new behavior is now gated behind the --noremote_allow_symlink_upload flag. https://docs.google.com/document/d/1gnOYszitgrLVet3sQk-TKGqIcpkkDsc6aw-izoo-d64 is a design proposal to support symlinks in the remote cache, which would render this change moot. I'd like to be able to prevent incorrect cache behavior until that change is implemented, though. This fixes https://github.com/bazelbuild/bazel/issues/4840 (again). Closes #5122. Change-Id: I2136cfe82c2e1a8a9f5856e12a37d42cabd0e299 PiperOrigin-RevId: 195261827
* Fix up newly discovered bugs in decoupled Android data processingGravatar asteinb2018-05-03
| | | | | | | | | | | | | | | | | | | | | | | | - Always generate a symbols file - the new resource processing pipeline likes knowing that this is non-null, and it shouldn't cost much extra to create. - A misleading method signature (which I made) led to me forgetting about Proguard artifacts. Properly propogate them into the ResourceApk object. - Don't get Aapt version directly from AndroidConfiguration - there's some additional logic in AndroidAaptVersion not exposed elsewhere - Split library tests that expect resources and assets to be processed together to have a new version where they're processed seperately. - Tests use ValidatedAndroidData interface rather than ResourceContainer object - Properly move some LocalTest magic around resource JAR out of the old pipeline only, as it should apply to both old and new pipelines. - Processing action defaults to empty resource and asset deps rather than null RELNOTES: none PiperOrigin-RevId: 195253161
* Thread legacy compile flags through CcToolchainProvider for compile build ↵Gravatar hlopko2018-05-03
| | | | | | | | | | variables This cl shuffles code around so that compile build variables don't require rule context and CppConfiguration. RELNOTES: None. PiperOrigin-RevId: 195249548
* Report what RemoteSpawnCache is doing.Gravatar Benjamin Peterson2018-05-03
| | | | | | | | | | | | | | | | Post ProgressStatus.CHECKING_CACHE if RemoteSpawnCache is checking the cache. The UI sees CHECKING_CACHE exactly the same as EXECUTING because no UIs currently have any special behavior for actions in cache-lookup state. This is still a UX improvement with --experimental_spawn_cache because EXECUTING is generally more correct than the old action state, which varies from harmless but unhelpful (no known state) to just wrong (C++ compile actions claimed they were doing include scanning during cache lookups). Closes #5130. Change-Id: I77421c3667c180875216f937fe0713f0e9415a7a PiperOrigin-RevId: 195233123
* In PackageLookupValue also track the repositoryGravatar Klaus Aehlig2018-05-03
| | | | | | | | ...to distinguish files with the same name that go through a repository symlink that has changed. Change-Id: I611c15ea5a48f4b797a725785165bf5a3aba387f PiperOrigin-RevId: 195226865
* Use the in-memory metadata in blaze as the source of truth for Fileset mappingsGravatar kush2018-05-02
| | | | | | | instead of the manifest files. RELNOTES: None PiperOrigin-RevId: 195149880
* Harden Profiler slow tasks capping testGravatar michajlo2018-05-02
| | | | | | | | | | | Internally slow task aggregators are sharded by thread id, so we need to throw some threads at it to get an interesting test case, otherwise everything comes from one thread and lands in one shard and the shard combination logic isn't exercised. Of course it's possible that all the threads created in the test wind up landing in the same shard, let's just pretend that's not going to happen, since the odds are pretty low. PiperOrigin-RevId: 195141874
* Do not add flags from linking_mode_flags section when the toolchain definesGravatar hlopko2018-05-02
| | | | | | | | | | | | | | | | | | | corresponding features. Therefore when both linking_mode_flags { mode: DYNAMIC } and feature { name: "dynamic_linking_mode" } are provided, bazel will only take flags from the feature. The same applies to mode: STATIC and static_linkin_mode feature respectively. mode: MOSTLY_STATIC_LIBRARIES is covered under dynamic_linking_mode for action "c++-link-dynamic-library". mode: FULLY_STATIC is handled separately. This is needed to provide a way of incremental migration towards legacy-flags-free crosstool. This is encore of https://github.com/bazelbuild/bazel/commit/fd9a0958a989cac1f08f15ab5643728469f9824e. In that cl I failed to pass flags coming from naked 'linker_flag' fields into legacy_link_flags. RELNOTES: None. PiperOrigin-RevId: 195131604
* 'Direct jars' should be a subset of recursively collected jarsGravatar cushon2018-05-02
| | | | | | | | | | | java_common.create_provider currently does not add the provided direct jars to the set of transitively collected jars, which is inconsistent with how the two sets are used in the native rule implementations. The direct jars should be the subset of transitive jars that corresponds to direct deps, they are not supposed to be disjoint. RELNOTES: in the JavaInfo created by java_common.create_provider now includes both direct and transitive arguments in transitive_compile_time_jars and transitive_runtime_jars PiperOrigin-RevId: 195123581
* Expose processed manifest in AndroidLocalTestGravatar asteinb2018-05-02
| | | | | | | | | | | | | Currently, resource processing does some final work on the manifest (mostly around data binding). Actually expose this manifest rather than some intermediate manifest. The manifest is already being generated, so we don't expect newly requesting it to cause any problems. And since AndroidLocalTest doesn't do data binding, the two manifests are presumably identical. RELNOTES: none PiperOrigin-RevId: 195106492
* Add --incompatible_disallow_legacy_javainfo flag.Gravatar tomlu2018-05-02
| | | | | | | | When set to true, old-style JavaInfo provider construction methods become an error. RELNOTES[INC]: Add --incompatible_disallow_legacy_javainfo flag. PiperOrigin-RevId: 195104452
* RELNOTES: Save Blaze memory by not storing LinkerInput objects in ↵Gravatar Googler2018-05-02
| | | | | | LinkCommandLine PiperOrigin-RevId: 195099909
* Simplify config fragment creation.Gravatar gregce2018-05-02
| | | | | | | | | Remove all unnecessesary accesses to ConfigurationEnvironment and deprecate the accesses that actually need ConfigurationEnvironment. For review, check out ConfigurationFragmentFactory first. PiperOrigin-RevId: 195099768
* Update test code to support finding deferred param files.Gravatar tomlu2018-05-02
| | | | | RELNOTES: None PiperOrigin-RevId: 195072243
* remote: introduce --disk_cache_flagGravatar David Ostrovsky2018-05-02
| | | | | | | | | | | | | | | Consolidate the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache= flag. Also, create the cache directory if it doesn't exist. RELNOTES: We replaced the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache flag. Additionally, Bazel now tries to create the disk cache directory if it doesn't exist. Closes #5119. PiperOrigin-RevId: 195070550
* Fix tests to be compatible with deferred param files.Gravatar tomlu2018-05-02
| | | | | | | For the most part, this involves removing assertions that there are param files as inputs, and that the param file arguments appears in the arguments list. RELNOTES: None PiperOrigin-RevId: 195070407
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 195040539
* Break out the rc file tests from the more general option parsing tests.Gravatar ccalvarin2018-05-01
| | | | | | | | | This allows us to have clear file setup and tear down, so we can more carefully test cases where files are present but intentionally ignored due to flags. Also stop using re2 and rely on gmock's MatchesRegex instead, which is more concise. RELNOTES: None. PiperOrigin-RevId: 195007726
* Add a codec for LinkedHashSet.Gravatar mjhalupka2018-05-01
| | | | PiperOrigin-RevId: 195002908
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194999124
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985157
* Resolve selects in the attributes of targets for cquery's --output=proto formatGravatar juliexxia2018-05-01
| | | | PiperOrigin-RevId: 194967939
* Move BazelLibrary from syntax/ to packages/Gravatar brandjon2018-05-01
| | | | | | | | | This helps the Skylark interpreter to not depend on Bazel concepts, though it adds a temporary dependency of Skylint on packages/. The fix for that will be to create a Build API interface for BazelLibrary (e.g., "BazelLibraryAPI"). Refactored some GlobalFrame construction logic to be more uniform. Instead of constructing a whole Environment just to get a frame, we build the frame directly, using ImmutableMap.Builder to accumulate bindings. This convention may further change once we convert MethodLibrary and the like to @SkylarkGlobalLibrary, but for now it's more readable. RELNOTES: None PiperOrigin-RevId: 194960824
* Use a new pattern for builtin Provider objects with @SkylarkCallable.Gravatar cparsons2018-05-01
| | | | | | | | This deprecates the old NativeProvider pattern. The new pattern is demonstrated using AppleStaticLibraryInfo. RELNOTES: None. PiperOrigin-RevId: 194956883
* Wire up future to wait for in NestedSetCodecWithStore.Gravatar janakr2018-04-30
| | | | PiperOrigin-RevId: 194895469
* Allow SkyFunctions to return a sentinel value indicating that all of a ↵Gravatar janakr2018-04-30
| | | | | | | | | | node's in-progress data should be forgotten, and its evaluation should be restarted from scratch, as if it were freshly created/dirtied. To guard against this happening unexpectedly, any such events are passed to a GraphInconsistencyReceiver, which can verify that the SkyFunction is behaving properly. This is the first change in a series to permit action rewinding when it is discovered that a previously generated input file is no longer available. When an action detects that one of its inputs is unusable, it can return this sentinel value, causing it to be re-evaluated from scratch. Follow-up changes will make the node corresponding to the input, and the node corresponding to the action that generated the input, dirty when this happens, causing the upstream action to be re-run, regenerating the desired input. Currently works for builds that do not keep edges, although follow-ups may make this possible for all builds. PiperOrigin-RevId: 194863097
* Name LateBoundDefaultApi skylark type.Gravatar cparsons2018-04-30
| | | | | | | This still leaves this type documented until a later time, but it makes the type's name explicitly defined (instead of inferred from the class name) RELNOTES: None. PiperOrigin-RevId: 194838958
* Headers specified in cc_library.textual_hdrs are passed through objc_libraryGravatar cpeyser2018-04-30
| | | | | | targets to upstream cc_library targets. PiperOrigin-RevId: 194816009
* Allow JavaInfo providers without sources or exportsGravatar cushon2018-04-30
| | | | PiperOrigin-RevId: 194799276
* Support ParamFileActionInput in LocalSpawnRunner.Gravatar tomlu2018-04-30
| | | | | RELNOTES: None PiperOrigin-RevId: 194798051
* Change LocationFunction to not extend Function.Gravatar dannark2018-04-30
| | | | | | | This is necessary for subsequent changes to the apply method for diamond splitting, which will require apply() to take more than one argument. But it seems like the only reason LocationFunction ever extended Function was for tests and so this is an improvement on its own. RELNOTES: None PiperOrigin-RevId: 194796136
* remote/http: fully read http content on error statusGravatar Jakob Buchgraber2018-04-30
| | | | | | | | | | | | | | | When the http response has a status other than 200 and also has a Content-Length header set, then wait until all content has been received before completing the user promise. In case of any errors, close the channel in order to make sure it's not reused as we don't know what data is left on the wire. Closes #5101. PiperOrigin-RevId: 194787393
* Refactor NestedSet to permit alternate NestedSetStore implementations.Gravatar cpeyser2018-04-30
| | | | PiperOrigin-RevId: 194787067
* Make runfiles usage on Windows more flexible to support remote execution.Gravatar Googler2018-04-30
| | | | | | | | | | | | | | | When trying to find a runfile on Windows: 1. First look for the runfiles MANIFEST and find runfile locations using this if it exists (current behavior). 2. If no MANIFEST file exists, look for runfiles in the runfiles directory (new behavior). As part of this, remove setting RUNFILES_MANIFEST_ONLY for the benefit of test-setup.sh. Instead of telling it what to do, it decides what to do based on the observed state of the world. Launchers still set RUNFILES_MANIFEST_ONLY for the benefit of launched programs, since some may depend on this. Fixes https://github.com/bazelbuild/bazel/issues/4962. RELNOTES: Remote execution works for Windows binaries with launchers. PiperOrigin-RevId: 194785440
* Remove the on-disk caching of Xcode locations.Gravatar jmmv2018-04-28
| | | | | | | | | | | | | | | | | | | | | | | There is no need for the cache to be on disk. Originally, there was a desire to share this cache with other tools... but this never happened. And, actually, because Bazel is in control of what it runs, it can just inject the "cached" values into those tools via flags. Instead, just store the cache in-memory. This avoids having to open and read the cache on every single action that is locally executed on a Mac. Results when building a large iOS app from a clean slate show up to a 1% wall time improvement on my Mac Pro 2013 and a reduction in the variance of the measurements. This change also gets rid of the OS check from the action execution's critical path. There is not much use in checking this: if we instantiate this by mistake, the actual calls will fail. But sometimes we want to actually run this code on non-macOS systems (e.g. for unit-testing with mocked tools), so we should allow that. And this change also ensures that XcodeLocalEnvProviderTest builds and runs... RELNOTES: None. PiperOrigin-RevId: 194681802