aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
Commit message (Collapse)AuthorAge
* Fixed the issue that hard links are handled improperly when bazel ↵Gravatar Googler2016-09-08
| | | | | | | | | decompresses tarballs. Issue link: https://github.com/bazelbuild/bazel/issues/574 -- MOS_MIGRATED_REVID=132434278
* Remove some dead code from PythonConfigurationLoader.Gravatar Ulf Adams2016-09-08
| | | | | | | | | There doesn't seem to be any need for a C++ toolchain to create a Python config anymore. I looked through the change history, but didn't find any obvious culprits / reasons for the current code. -- MOS_MIGRATED_REVID=132429818
* Use named parameters for function in SkylarkRepositoryContext when it make senseGravatar Damien Martin-Guillerez2016-09-07
| | | | | | | | | | | | | | RELNOTES[INC]: repository_ctx.{download,download_and_extract,execute} API now use named parameters for optional parameters and no longer uses argument type to distinguished between arguments (executable attribute name must be specified when preceding optional arguments are missing). Fixes #1426. -- Change-Id: I41d174cd9fd5c47edf4e2e9a86ce7f6c7882a104 Reviewed-on: https://bazel-review.googlesource.com/#/c/5673 MOS_MIGRATED_REVID=132421955
* Windows, tests: more refactoring in testsGravatar Laszlo Csomor2016-09-07
| | | | | | | | | Move more logic from FilesFileOperationsTest into WindowsTestUtil, and further separate test files in the BUILD file. -- MOS_MIGRATED_REVID=132417714
* Windows, tests: move code into WindowsTestUtilGravatar Laszlo Csomor2016-09-07
| | | | | | | | | | | | Additionally: - clean up the corresponding BUILD file a bit - add a comment to Path A subsequent change will add tests for WindowsFileSystem, then fix a bug there. -- MOS_MIGRATED_REVID=132408212
* Update all tests so that they use a cc_toolchain_suite instead of a ↵Gravatar Lukacs Berki2016-09-06
| | | | | | | | | filegroup to declare C++ toolchains. Tested by actually removing support for filegroups; it's a ~5-line change, but it's better to do that separately so that it can be rolled back easily if need be. -- MOS_MIGRATED_REVID=132320198
* Skylark no longer crashes when the default value of an attribute is a label ↵Gravatar Florian Weikert2016-09-06
| | | | | | | | | string that points to a remote repository. Fixes #1442. -- MOS_MIGRATED_REVID=132320130
* Make print() and fail() available in BUILD files to allow easier debugging.Gravatar Googler2016-09-06
| | | | | | | | | The functions were already available in Skylark extensions, but not directly in the BUILD files. RELNOTES[NEW]: print and fail are now available in BUILD files. -- MOS_MIGRATED_REVID=132307913
* Removing Guava deps from all BUILD files in junitrunner.Gravatar Irina Iancu2016-09-06
| | | | | | | | | | All usage of Guava has been removed from junitrunner. It is now safe to also remove all deps from the BUILD files. Fixing issue #1150. -- MOS_MIGRATED_REVID=132252042
* Generate documentation for named parameters for SkylarkCallableGravatar Damien Martin-Guillerez2016-09-06
| | | | | | | | | Fixes #1470. -- Change-Id: If16e32ac6e9b71680b6ed73987f1164545a99920 Reviewed-on: https://bazel-review.googlesource.com/#/c/5670/ MOS_MIGRATED_REVID=132243744
* Roll forward of commit 19db71413329da3f5d22b5fc7681471f3d971d88 (Skylark: ↵Gravatar Florian Weikert2016-09-06
| | | | | | | | | | | | | Replaced late bound attributes with computed default attributes) with two bug fixes: 1. Unlike SkylarkComputedDefault, SkylarkComputedDefaultTemplate did not sort the names of its attribute dependencies. Consequently, lookup operations failed when callback functions in bzl files specified the names of their required attributes in a non-alphabetical order since the order of the key tuples was different (e.g. [1, 2] vs [2, 1]). It would be less error prone to always sort the dependencies in createDependencyAssignmentTuple(), but this would impact performance. 2. SkylarkCallbackFunction ignores the legacy "cfg" parameter in callback functions. This special case should be deleted once all cfg parameters have been removed from the depot. -- MOS_MIGRATED_REVID=132235927
* Better API for creating immutable Skylark lists.Gravatar Dmitry Lomov2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132226460
* Make --experimental_interleave_loading_and_analysis a no-op.Gravatar Ulf Adams2016-09-06
| | | | | | | | | | | | This is now enabled by default, and this change removes the code path where it's disabled. Remove a few tests that were testing the removed code, and rewrite some others that still seem useful. We still drop configured targets on configuration changes, so we use that to check that things are dropped from Skyframe. -- MOS_MIGRATED_REVID=132226208
* Adds a jar filter to the IntelliJ IDE aspect.Gravatar Googler2016-09-06
| | | | | | | | | | | | | | | | Any java rule that mixes generated and non-generated sources will produce a filtered jar containing only the generated output. For a java rule with only "normal" sources or only generated source files, no filtered jar is produced. This will allow the IDE to resolve those generated sources. RELNOTES:None -- MOS_MIGRATED_REVID=132113568
* Fixed NPEs when using built in functions as rule implementationsGravatar Vladimir Moskva2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132066368
* Rollback of commit 19db71413329da3f5d22b5fc7681471f3d971d88.Gravatar Tobias Werth2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132058819
* Test order of -l and -L args for CppLinkActionGravatar Marcel Hlopko2016-09-06
| | | | | | | | I'm going to refactor these args out to crosstool so I wrote this little test to keep me honest. -- MOS_MIGRATED_REVID=132044125
* Windows, JNI: implement native isJunction method.Gravatar Laszlo Csomor2016-09-06
| | | | | | | WindowsFileSystem.java does not yet use it. -- MOS_MIGRATED_REVID=132043739
* Implement flow control for gRPC and cleanup the interface to it a bit.Gravatar Lukacs Berki2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132039389
* Skylark: Replaced late bound attributes with computed default attributesGravatar Mark Schaller2016-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: Compared to computed default attributes, late bound attributes are evaluated in a later phase (analysis instead of loading phase). While both mechanisms provide access to other attributes of a rule, only late bound attributes additionally provide access to the build configuration. However, late bound attributes could be used to return new labels that have not been loaded before. Since this happens in the analysis phase, it can break one of Blaze's underlying principles, thus introducing a serious correctness bug. We decided to replace late bound attributes in Skylark with computed default attributes since this moves the evaluation of values into the loading phase, thus fixing this bug. Moreover, none of the existing users of this mechanism required access to the build configuration, which means that the user impact of this change is minimal. Implementation details: Unlike attributes of non-Skylark rules, however, Skylark computed defaults need to be able to depend on more than two configurable attributes since all attributes of Skylark rules are configurable by default. This has two implications: 1. Unlike "normal" Skylark attributes, Skylark computed defaults need to know about the existence of other attributes in order to declare a dependency on them. This CL takes advantage of work previously done to require parameter names to be the names of attributes used by the computed default function. 2. Since Bazel computes the combinations of all possible attribute values, a Skylark rule with a computed default that depends on a lot of configurable attributes could crash Bazel. Consequently, this CL also introduces an upper bound (64) for the number of valid combinations. Caveats: 1. Getting the depended-on attributes' names from function paramters is mildly surprising. Alternatives: The best solution would be to keep SkylarkLateBound, but restrict it in a way that it can only return already loaded labels. This is not possible right now. -- MOS_MIGRATED_REVID=131967238
* Make MemoizingEvaluatorTest#nodeInvalidatedThenDoubleCycle a bit more complete.Gravatar Janak Ramakrishnan2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131944129
* Open-source many of tests from SkylarkIntegrationTest.Gravatar Dmitry Lomov2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131929298
* First step towards allowing returning declared providers from rule ↵Gravatar Dmitry Lomov2016-09-01
| | | | | | | implementations. -- MOS_MIGRATED_REVID=131923497
* xcode_configure repository rule for determining locally installed versions ↵Gravatar Chris Parsons2016-09-01
| | | | | | | | | | | of xcode to select between, relaxing the requirement that users specify --xcode_version and --ios_sdk_version even if they have only one version installed. RELNOTES: On mac devices, detect locally installed versions of xcode to: 1. Use a sensible default if xcode is required but --xcode_version is unspecified. 2. Use sensible default iOS SDK version for the targeted version of xcode if ios_sdk_version is unspecified. -- MOS_MIGRATED_REVID=131841587
* Remove the "cc_*.includes attribute must refer to the third_party directory" ↵Gravatar Lukacs Berki2016-08-31
| | | | | | | | | | | warning from Bazel. This behavior doesn't really make sense except within Google. Fixes #1286. -- MOS_MIGRATED_REVID=131813322
* Add a couple more stubs for new resource_* toolsGravatar Googler2016-08-31
| | | | | | | Add for consistency -- missed from the earlier CL -- MOS_MIGRATED_REVID=131735784
* Do not load the transitive closure of the Android SDK on every build.Gravatar Lukacs Berki2016-08-31
| | | | | | | This makes the sanity check dependent on the configuration fragments returning proper roots, but it's not that bad because it already depends on them returning the proper set of implicit labels and #getImplicitLabels() will go away soon anyway. -- MOS_MIGRATED_REVID=131705535
* Make aspects attached to aliases work when their actual= attribute is a select.Gravatar Lukacs Berki2016-08-31
| | | | | | | Fixes https://github.com/bazelbuild/e4b/issues/6 . -- MOS_MIGRATED_REVID=131698950
* Avoid building android R class ijar / header jarGravatar Googler2016-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | It is already ignored and the real jar used as the compileTime jar in AndroidCommon. It's only used by the ide-resolve output group. The real jar is pretty close to the header jar in terms of content (field inits deleted). Tradeoff: The real jar is ~33% bigger (w/ same compression level), vs save build time and space by skipping the hjar actions and artifacts. At android_binary level, the hjar action can take ~40 seconds in some cases. At the library level, the hjar time is pretty tiny. hjars are not compressed. We could compress the real jars to make up for the extra 30% size (and beat the hjar size), but that adds ~25% elapsed time to do the compression (e.g., 10s vs 7.5s). Compression can shrink the jar 2-3x (37MB vs 100MB). -- MOS_MIGRATED_REVID=131588283
* Implement generating single-page Build Encyclopedia.Gravatar David Chen2016-08-29
| | | | | | | | | | | | | | * Adds a --single_page flag to the BE docgen for generating a single-page version of the Build Encyclopedia. * Refactor BuildEncyclopediaProcessor common logic into a base class and add subclasses for generating single- and multi-page BE respectively. * Enable RuleLinkExpander to expand rule references to single-page hrefs (headings on the current page). * Update docgen velocity templates to use RuleLinkExpander to ensure links are correct on both single- and multi-page versions of the BE. -- MOS_MIGRATED_REVID=131574793
* Add some type arguments to make Bazel compile again.Gravatar Lukacs Berki2016-08-29
| | | | | -- MOS_MIGRATED_REVID=131570943
* Replace doc pages with redirects to versioned doc pages.Gravatar David Chen2016-08-29
| | | | | | | | | | | | | | * Add a new `redirect` Jekyll layout. * Replace all pages under docs/ with redirects to corresponding page under versions/master/. * Prepend links on Documentation sidebar, including generated navs for the Skylark Library and Build Encyclopedia, with prefix for versioned directory. * Add code to both the internal jekyll-config.sh and external jekyll-tree.sh to add redirect pages for the Skylark Library and Build Encyclopedia. * Bring the branched User Manual doc up to date with latest changes. -- MOS_MIGRATED_REVID=131568800
* Add realpath method to SkylarkPath.Gravatar David Chen2016-08-29
| | | | | | | | | Fixes #1685 RELNOTES: Add path.realpath() method for Skylark repositories. -- MOS_MIGRATED_REVID=131568751
* Some little fixes to ResourceManager.Gravatar Philipp Wollermann2016-08-29
| | | | | | | | - Make sure that empty ResourceSets are always == ResourceSet.ZERO and use that for easier comparison. - No longer allow nested resource acquisition, because it may lead to deadlocks. -- MOS_MIGRATED_REVID=131567446
* Fix resource leakage on interrupt in ResourceManager identified by philwo.Gravatar Janak Ramakrishnan2016-08-27
| | | | | | | On interrupt, we never released any resources that we had asked to acquire, even though those resources would eventually be acquired. -- MOS_MIGRATED_REVID=131431321
* Remove all references to (incorrect) BlazeDirectories.buildDataDirectory rootGravatar Kristina Chodorow2016-08-26
| | | | | | | | | The buildDataDirectory is calculated off of the incorrect execroot. More progress towards #1681. -- MOS_MIGRATED_REVID=131407798
* sandbox: Allow network access for builds by default.Gravatar Philipp Wollermann2016-08-26
| | | | | | | | | | | | | This solves a performance issue that slowed down builds by about 40% at least on Linux, due to clone() with CLONE_NEWNET becoming extremely slow (>1 second) for highly parallel builds. See this thread for a discussion: https://lkml.org/lkml/2014/8/20/40 For the sake of consistency, we apply the same policy on OS X, too. If we find a better way to block network access for processes on Linux that doesn't have this performance hit, we will revisit this. RELNOTES: Sandboxed builds allow network access for builds by default. Tests will still be run without networking, unless "requires-network" is specified as a tag. -- MOS_MIGRATED_REVID=131393514
* --Gravatar Philipp Wollermann2016-08-26
| | | | MOS_MIGRATED_REVID=131383292
* Add client environment to ActionExecutionContextGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | As the execution of an action now also depends on the client environment, make the latter part of the ActionExecutionContext, so that enough context is provided to actually execute an action. -- Change-Id: Ida7bf407ef0c0375728faba92494bfd47dcbaeb8 Reviewed-on: https://bazel-review.googlesource.com/#/c/5391 MOS_MIGRATED_REVID=131377490
* Allow cycle detector to be injected into ParallelEvaluator, so that callers ↵Gravatar Janak Ramakrishnan2016-08-26
| | | | | | | can use different cycle detection algorithms if they wish. -- MOS_MIGRATED_REVID=131347160
* Refactor ParallelEvaluator in preparation for making it more modular with ↵Gravatar Janak Ramakrishnan2016-08-26
| | | | | | | | | | | respect to cycle checking. Reducing the size of ParallelEvaluator.java is also probably long overdue. I believe this change stands on its own, but if you don't think the third change is worth it, and this isn't worth it on its own, feel free to push back. -- MOS_MIGRATED_REVID=131340165
* Some optimizations in Type#flatten (used under the covers by ↵Gravatar Nathan Harmata2016-08-25
| | | | | | | | | | | | | AggregatingAttributeMapper#visitLabels): -Rename Type#flatten to Type#extractLabels. -Change the return type of Type#extractLabels from Collection to Iterable. This way we don't need to create and concatenate large lists. -Add an internal-only Type#containsLabels so this way ListType and DictType can have efficient implementations of Type#extractLabels. Note that AggregatingAttributeMapper#visitLabels is called multiple times on the same in several different places during the lifetime of a non-incremental Blaze invocation (e.g. during Package loading, during transitive target visitation, etc) -- MOS_MIGRATED_REVID=131311698
* Remove ArtifactFactory dependency on incorrect exec rootGravatar Kristina Chodorow2016-08-25
| | | | | | | | | | | Somewhat trickily, this changes the execRoot field from referring to [output_base]/execroot/wsname (not really the exec root) to [output_base]/execroot (actually the execroot). Progress on #1681. -- MOS_MIGRATED_REVID=131286181
* Action#discoverInputs returns an Iterable<Artifact> instead of aGravatar Cal Peyser2016-08-25
| | | | | | | Collection<Artifact> -- MOS_MIGRATED_REVID=131285541
* Bazel shell scripts: fix links in licence comments.Gravatar Laszlo Csomor2016-08-24
| | | | | | | I suspect they were overwritten by an eager sed "s,//,#,g" command. -- MOS_MIGRATED_REVID=131159373
* Extend Action interface by client variablesGravatar Klaus Aehlig2016-08-24
| | | | | | | | | | | | | | | | As per our design on [Specifying environment variables](http://bazel.io/designs/2016/06/21/environment.html), actions may depend, in a controlled way, on the environment in which the Bazel client is invoked. Those environment variables are considered essential for the action, in the sense that it was to be repeated if either of them changes their value (note that other variables in client environment may well change without invalidating actions). Therefore, make the variables that need to be taken from the client environment part of the meta data for actions. -- Change-Id: I2ff6cf40b4ce8e0fea5c7e464f5f3b3e693025ac Reviewed-on: https://bazel-review.googlesource.com/#/c/5390 MOS_MIGRATED_REVID=131150211
* Automated [] rollback of commit 846a5ab98fc26d72024890fdb79a5d3bc6a5a1ba + ↵Gravatar Nathan Harmata2016-08-23
| | | | | | | | | | | | | | | manual rollback of [] *** Reason for rollback *** Depot has been fixed / is in the process of being fixed. See the work tracked on [] *** Original change description *** Automated [] rollback of commit bb5d5efb4b50710241b5b374eb67084f4bf08278. -- MOS_MIGRATED_REVID=131095905
* Avoid copying SkyKeys into a set and then into a map when retrieving them. ↵Gravatar Janak Ramakrishnan2016-08-23
| | | | | | | | | | | | | Instead, just put them directly into a map. This avoids the memory churn and CPU cost of the set. As a result, we have to use HashMaps instead of ImmutableMap.Builders, which I hope is ok (especially since we're not keeping them around), and due to that, we have some nice nondeterminism in the returned order, which matters for some cycle-checking tests. Also, don't use a map at all when we don't need to (when building events). Note that, since we have to deduplicate at some point, this means that changing the return type of SkyFunction.Environment#getValues to not be a random-access map is probably not worth it. Changing the return type of ProcessableGraph#getBatch to not be a random access map might still be worthwhile, although it might require some funny operations. -- MOS_MIGRATED_REVID=131070418
* Prune .pcm files based on the results of include scanning.Gravatar Googler2016-08-23
| | | | | | | Basically, take the set of headers found by #include scanning and check what modules they are coming from. If a module provides at least one of the required headers, it is required as are all of its dependent modules (because of the way modules are implemented). Only use the actually required modules as compilation inputs and as flags handed in on the command line. Also move the logic to calculate top-level modules from the analysis phase into the execution phase. In the long run, we might be able to completely remove this logic now, but for now, we want to be able to quickly switch between the old and the new behavior. Thus, pruning of modules is now guarded on a feature prune_module_headers. -- MOS_MIGRATED_REVID=131058820
* More flexible LValue syntaxGravatar Vladimir Moskva2016-08-23
| | | | | -- MOS_MIGRATED_REVID=131056178