aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Add syntax for referencing docs in other rule families.Gravatar David Chen2016-02-25
| | | | | | | | | | | | This CL implements a new `${link rule.attribute}` syntax which can be used to reference the documentation of rules and attributes of other rule families. For example, `${link cc_library.deps}` will generate a link to the documentation for the `deps` attribute of the `cc_library` rule. Similarly, this syntax can also be used to reference sections of static documentation, for example `${link common-definitions.label-expansion}`. -- MOS_MIGRATED_REVID=115492361
* Handle http <-> https redirectsGravatar Michajlo Matijkiw2016-02-25
| | | | | | | | | | | Support all 301 and 302 redirect handling in bazel. Only support absolute Location redirects (this is the spec, we can revisit if we find a lot of servers are doing it wrong). Fixes #959. -- MOS_MIGRATED_REVID=115490327
* Expose to Skylark information about whether a target defines any Android ↵Gravatar Dmitry Lomov2016-02-24
| | | | | | | | | | | | resources. In Java code, it is a shared logic in LocalResourceContainer.definesAndroidResources (that method has a fair number of usages). This CL exposes that information on AndroidIdeInfoProvider and futher on AndroidSkylarkInforProvider. -- MOS_MIGRATED_REVID=115453472
* Expose IDL information about Android targets to Skylark.Gravatar Dmitry Lomov2016-02-24
| | | | | | | Make more tests pass for Skylark IDE info aspect implementation. -- MOS_MIGRATED_REVID=115448483
* Refactoring of the OptionsParser implementation to allow overriding the ↵Gravatar Luis Fernando Pino Duque2016-02-24
| | | | | | | | | value of an option with null. Currently it returns the original default value if the new value is null. -- MOS_MIGRATED_REVID=115442253
* Collect runtime dependencies correctly in intellij_info.bzlGravatar Dmitry Lomov2016-02-24
| | | | | -- MOS_MIGRATED_REVID=115440358
* Implements repository_ctx.templateGravatar Damien Martin-Guillerez2016-02-24
| | | | | | | | | | | repository_ctx.template enable writing a file in the remote repository tree using a template and a list of substitution in a similar way as the ctx.template_action for regular skylark rule. Issue #893: Step 4 of http://goo.gl/OZV3o0. See http://goo.gl/fD4ZsY. -- MOS_MIGRATED_REVID=115439344
* Enable access to file values in repository contextGravatar Damien Martin-Guillerez2016-02-24
| | | | | | | | | | | | | | | | ctx.path now works with labels. When given a label, ctx.path() will returns the path to the corresponding file if the label point to a file, or error out if it does not point to file. Also fix a small case with repository_ctx.symlink that wasn't creating its directories. This is needed to enable reading template files to create a template function (see http://goo.gl/fD4ZsY) for issue #893 (step 4 of http://goo.gl/OZV3o0). -- MOS_MIGRATED_REVID=115438400
* Blaze - ObjcProtoLibrary: Adds support for the new protobuf library. This ↵Gravatar Googler2016-02-24
| | | | | | | includes improvements such as proto3 syntax support for Objective C. -- MOS_MIGRATED_REVID=115395892
* Enable testJavaPlugin for Skylark intellij_info aspect.Gravatar Dmitry Lomov2016-02-23
| | | | | -- MOS_MIGRATED_REVID=115374342
* Add initial Skylark API for Android rules.Gravatar Dmitry Lomov2016-02-23
| | | | | -- MOS_MIGRATED_REVID=115364137
* Remove current directory from PATH values.Gravatar Julio Merino2016-02-23
| | | | | | | | | | | | | Having an empty path component in the PATH is equivalent to having a path component pointing to the current directory. This is generally considered harmful because it can lead to the execution of binaries planted in specific locations without the user's knowledge (though I do not think there is a problem per se in Bazel). Fixes #958. -- MOS_MIGRATED_REVID=115363638
* Support "mandatoryProvidersList" in Skylark and added necessary testsGravatar Yun Peng2016-02-23
| | | | | | | | The type of attribute "providers" now is a list of lists of string. But a list of string is still supported. -- MOS_MIGRATED_REVID=115357326
* Implements repository_ctx.fileGravatar Damien Martin-Guillerez2016-02-23
| | | | | | | | | repository_ctx.file enable writing random file in the remote repository tree. Issue #893: Step 4 of http://goo.gl/OZV3o0. See http://goo.gl/fD4ZsY. -- MOS_MIGRATED_REVID=115338910
* Implements repository_ctx.osGravatar Damien Martin-Guillerez2016-02-23
| | | | | | | | | | | repository_ctx.os gives access to os related information: - .system returns the name of the current platform. - .environ returns the list of environment variables. Issue #893: Step 4 of http://goo.gl/OZV3o0. See http://goo.gl/fD4ZsY. -- MOS_MIGRATED_REVID=115337406
* Implements repository_ctx.executeGravatar Damien Martin-Guillerez2016-02-23
| | | | | | | | | | This add a repository_ctx.execute() method for spawning action from a skylark remote repository. Issue #893: Step 4 of http://goo.gl/OZV3o0. See http://goo.gl/fD4ZsY. -- MOS_MIGRATED_REVID=115335198
* Rename proto dependencies to include a _java component in them.Gravatar Julio Merino2016-02-23
| | | | | | | | While doing this, homogenize the two dependencies on build.proto (via build_proto and build_proto_v2) into a single build_java_proto. -- MOS_MIGRATED_REVID=115328219
* Fix blatant bug with Skyframe globbing where we incorrectly allow dangling ↵Gravatar Nathan Harmata2016-02-23
| | | | | | | | | | | | | symlinks to match a glob pattern. This bug has/had two consequences: (1) Change pruning will incorrectly cut off changes to GlobValues that ought to now match more files (say, if a dangling symlink comes into existence), causing a package to be incorrectly incrementally not re-loaded. (2) After a recent change to PackageFunction where we use a fancy hybrid globbing approach, we use skyframe globbing on incremental package loading. So if a re-loaded package has the same glob pattern but this glob pattern incorrectly matches a dangling symlink, the re-loaded package will incorrectly have a target for the dangling symlink path. -- MOS_MIGRATED_REVID=115274842
* Prevent new evaluations from starting if a done child's error is discovered. ↵Gravatar Janak Ramakrishnan2016-02-23
| | | | | | | Also delete some code that's been dead for a while, now that we eagerly shut down evaluation when we come across a child in error during a fail-fast evaluation. -- MOS_MIGRATED_REVID=115272603
* Changed mandatoryProviders to mandatoryProvidersListGravatar Yun Peng2016-02-22
| | | | | | | | "mandatoryProvidersList" is a list of sets of providers. For any rule, if it provides all the providers from one of those sets, we consider the dependency valid. -- MOS_MIGRATED_REVID=115221394
* Remove unused code for SYNOPSIS, ATTRIBUTE_DEFINITION, and ATTRIBUTE_SIGNATUREGravatar David Chen2016-02-22
| | | | | | | docgen variables. -- MOS_MIGRATED_REVID=115204049
* Expose ``build_file_path`` to Skylark rules.Gravatar Dmitry Lomov2016-02-22
| | | | | | | | Also adds neccessary support to Skylark implementation of IDE info aspect. -- MOS_MIGRATED_REVID=115084383
* Add the names of the mandatory inputs to the action key for actions that ↵Gravatar Lukacs Berki2016-02-22
| | | | | | | | | discover their inputs. This makes the case work where an extra input is added to an action, but it's still an action cache hit because the discovered inputs did not change, and thus the set of inputs action cache becomes stale. -- MOS_MIGRATED_REVID=115060976
* Removes "startsWith" check in testGravatar Yue Gan2016-02-19
| | | | | | | | | | | | com.google.devtools.build.lib.sandbox.LocalLinuxSandboxedStrategyTest.testExecutionFailurePrintsCorrectMessage. We modified the error message of sandbox failure, and new error message (commandLineArgs) is not able to get in test. Fixes #939. -- MOS_MIGRATED_REVID=115058938
* Add repository_ctx.which(str): returns the path of a commandGravatar Damien Martin-Guillerez2016-02-19
| | | | | | | | | This methods mimick the behavior of the `which` utility. Issue #893: Step 4 of http://goo.gl/OZV3o0. See http://goo.gl/fD4ZsY. -- MOS_MIGRATED_REVID=115050970
* Implement pop(), popitem() and setdefault() for dictGravatar Francois-Rene Rideau2016-02-19
| | | | | -- MOS_MIGRATED_REVID=114966513
* Initial support for Java header compilationGravatar Liam Miller-Cushon2016-02-18
| | | | | | | | | 'Turbine' compiles ijars from source, ignoring method bodies and relaxing error checks for performance. We can then do normal compilation against those ijars and move javac off the build's critical path. -- MOS_MIGRATED_REVID=114919013
* Add a SkylarkRepositoryContextTestGravatar Damien Martin-Guillerez2016-02-17
| | | | | | | | | This test class is just testing attr for now but it will be extended with further test to test non trivial methods of the SkylarkRepositoryContext. -- MOS_MIGRATED_REVID=114897054
* Introduce SkylarkRepositoryModuleGravatar Damien Martin-Guillerez2016-02-17
| | | | | | | | | | | | | | | | | The SkylarkRepositoryModule declare the `repository_rule` function to Skylark to define new remote repository types (http://goo.gl/OZV3o0). The work is delagated to the `SkylarkRepositoryFunction` by the `RepositoryDelegatorFunction`. `SkylarkRepositoryContext` defines the `ctx` object passed to the `repository_rule` implementation function. This change also introduce a `SkylarkPath` and the necessary methods in `SkylarkRepositoryContext` to showcase the creation of a `local_repository` like repository. Issue #893: step 3 of the roadmap http://goo.gl/OZV3o0. -- MOS_MIGRATED_REVID=114895003
* Reinstate mutable maps, again.Gravatar Francois-Rene Rideau2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114860576
* Use absolute paths in ProcessBuilder invocations.Gravatar Dmitry Lomov2016-02-17
| | | | | | | Needed for #276. -- MOS_MIGRATED_REVID=114838538
* Include real type in type casting error message.Gravatar Tobias Werth2016-02-16
| | | | | -- MOS_MIGRATED_REVID=114751682
* Roll forward of commit 500175fcfb37953f50cf0869df164902755807f2: Don't ↵Gravatar Googler2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include absolute paths in blaze IDE artifacts NEW: Fixed bazel java_test rules Rollback of commit a4ba24e286b7e9a7a09e333d8eb64a8cf7e81895. *** Reason for rollback *** Rollforward, fixing bazel java_test rules *** Original change description *** Automated [] rollback of commit 500175fcfb37953f50cf0869df164902755807f2. *** Reason for rollback *** Breaks Bazel Build http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/356/console *** Original change description *** Don't include absolute paths in blaze IDE artifacts RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114751236
* bazel_go_example_test.sh: Inline BUILD.go-toolchainGravatar Damien Martin-Guillerez2016-02-16
| | | | | | | | | | | | | BUILD.go-toolchain was deleted as part of the base workspace removal and made bazel_go_example_test starts to fails because it was copying it. Recreating its content in the test corrects the test fixture. Fixes #905. -- MOS_MIGRATED_REVID=114732179
* Add support for downloading .tar.bz2 files with http_archive rules.Gravatar David Chen2016-02-16
| | | | | | | | | Fixes #897 RELNOTES: Add support for .tar.bz2 archives to http_archive rules. -- MOS_MIGRATED_REVID=114729580
* Reduce the number of stat calls when setting up a sandboxGravatar Brian Silverman2016-02-16
| | | | | | | | | | | | This improved performance for a (somewhat artificial) test which runs 100 genrules each with 3000 inputs by 25% on my laptop (2x hyperthreaded cores, SSD, ext4). Test code at <https://gist.github.com/bsilver8192/10527a862ce16bb7f79a>. -- Change-Id: I7a7aaccdfbe2925c7e962c0192924ef1cf80b33a Reviewed-on: https://bazel-review.git.corp.google.com/#/c/2840/1..2 MOS_MIGRATED_REVID=114694334
* Rollback of commit 500175fcfb37953f50cf0869df164902755807f2.Gravatar Damien Martin-Guillerez2016-02-15
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel Build http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/356/console *** Original change description *** Don't include absolute paths in blaze IDE artifacts RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114682419
* Replace a few more uses of the Constants.TOOLS_REPOSITORYGravatar Luis Fernando Pino Duque2016-02-15
| | | | | -- MOS_MIGRATED_REVID=114680762
* Enable injection of Skylark modules through the RuleClassProviderGravatar Damien Martin-Guillerez2016-02-15
| | | | | | | | | | | This enable BlazeModule to specify extraneous Skylark modules. This will be used by Skylark remote repositories to add them from the BazelRepositoryModule. Issue #893, step 2 of the roadmap of http://goo.gl/OZV3o0 -- MOS_MIGRATED_REVID=114677157
* Don't include absolute paths in blaze IDE artifactsGravatar Googler2016-02-15
| | | | | | | RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114550121
* Prevent load statements in remote repository's WORKSPACE file to breakGravatar Damien Martin-Guillerez2016-02-12
| | | | | | | | | | | | | | | If a load statements was present in a remote repository's WORKSPACE file, the parsing of the WORKSPACE file to get the workspace name will break the build because it tries to load the Skylark extension from the main repository. This change replace the parsing of the whole remote repository's WORKSPACE file by a parsing of only it first chunk (before the first load statement). This change also enforce that the workpace() function to be called only from the top of the WORKSPACE file. -- MOS_MIGRATED_REVID=114528640
* Add an experimental flag to enable the Skyframe-based loading phase runner.Gravatar Ulf Adams2016-02-12
| | | | | | | | | | | | | | Refactor the CommandEnvironment to no longer create a LoadingPhaseRunner eagerly. Unfortunately, that means we can't reuse the TargetPatternEvaluator either. Fortunately, the SkyframeTargetPatternEvaluator is a very lightweight class, which only contains the offset as state, so we just create a new instance whenever we need one. On the plus side, the LoadingPhaseRunner API is now stateless, and the QueryCommand no longer creates a unnecessary LoadingPhaseRunner instance. -- MOS_MIGRATED_REVID=114519731
* Adds a build_file_content attribute to new_git_repository, new_http_archive, andGravatar Alex Humesky2016-02-12
| | | | | | | | | | | | | new_local_repository which allows the build file to be specified by a string directly in the rule rather than using a separate file. build_file and build_file_content are both optional, but one or the other must be specified. RELNOTES: build_file_content attribute added to new_git_repository, new_http_archive, and new_local_repository. -- MOS_MIGRATED_REVID=114490435
* Support MOSTLY_STATIC with --build_test_dwp.Gravatar Googler2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114469301
* Rollback of commit a0eefb52f529b73c6cb92f0a762853646ea2eae6.Gravatar Googler2016-02-11
| | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the restored logic to avoid stat calls on injected Metadata. *** Original change description *** Automated [] rollback of commit df03e10f6552566982399b8779fe7bc7a17d75dc. -- MOS_MIGRATED_REVID=114447944
* Rewrite the test to work with Bazel - avoid bash_version.Gravatar Ulf Adams2016-02-11
| | | | | | | | | | | Instead, we simply introduce an error after the rule - that means the package is in error, but the target still exists. I checked that this covers the same code path that I wanted to cover in the original change. Fixed #879. -- MOS_MIGRATED_REVID=114443076
* Expose some information about Java compilation to Skylark.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114438050
* Enable smoke tests for Java information being provided on Android rules.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114435744
* Add support for java_imports to Skylark IDE info aspect.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114434073
* Expose Java annotation processing information to Skylark.Gravatar Dmitry Lomov2016-02-11
| | | | | | | Also added some features to Skylark aspect. -- MOS_MIGRATED_REVID=114431594