aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com
Commit message (Collapse)AuthorAge
* Add is_external support to PackageManifestParser.Gravatar Googler2017-02-24
| | | | | | -- PiperOrigin-RevId: 148375330 MOS_MIGRATED_REVID=148375330
* Add the LABEL_KEYED_STRING_DICT type for attributes.Gravatar Michael Staib2017-02-24
| | | | | | | | | This enables both native and Skylark rules to declare attributes which have labels/Targets as keys, and have string values. -- PiperOrigin-RevId: 148365033 MOS_MIGRATED_REVID=148365033
* Report inconsistent aspect order error to the user.Gravatar Dmitry Lomov2017-02-24
| | | | | | -- PiperOrigin-RevId: 148342788 MOS_MIGRATED_REVID=148342788
* Expose rpath entries as a build variableGravatar Marcel Hlopko2017-02-24
| | | | | | | | Unlike commit e2239cc61ca170ff9a65e1a94c3344d2b272c9e2, this only adds "." to the rpath if isNativeDeps is true. -- PiperOrigin-RevId: 148330144 MOS_MIGRATED_REVID=148330144
* Remove ctx.aspect_id and Target.aspect_ids.Gravatar Dmitry Lomov2017-02-23
| | | | | | -- PiperOrigin-RevId: 148322874 MOS_MIGRATED_REVID=148322874
* Add ctx.aspect_ids, deprecate ctx.aspect_id and Target.aspect_ids.Gravatar Dmitry Lomov2017-02-23
| | | | | | | | BUG=35456356 -- PiperOrigin-RevId: 148317662 MOS_MIGRATED_REVID=148317662
* str.partition and str.rpartition return tuples instead of listsGravatar Vladimir Moskva2017-02-23
| | | | | | -- PiperOrigin-RevId: 148281228 MOS_MIGRATED_REVID=148281228
* Use skylark-preferred quote char for string literalGravatar Michajlo Matijkiw2017-02-23
| | | | | | | | | | We currently have no need to discern between strings quoted with ' or ". While it could be nice for something one day (and may have been in the past), it's yagni now. Removing the distinction simplifies string concatenation. -- PiperOrigin-RevId: 148273400 MOS_MIGRATED_REVID=148273400
* Replace the fancy, lockless, and incorrect BoundedMultisetSemaphore and with ↵Gravatar Nathan Harmata2017-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a boring naive synchronized implementation. There's a race condition in my design of the lockless data structure. I haven't been able to come up with a lockless algorithm that actually works, and the naive one seems to be fine. In Blaze's usage, performance actually isn't super important so the naive implementation is fine. Consider three threads and a MultisetSemaphore with 2 max unique values. T1: acquireAll({a, b}) T2: acquireAll({a, c}) T3: acquireAll({a, d}) For the for-loop before the 'acquire' call, suppose: -T1 wins the race to acquire 'a' [1] and also wants to acquire 'b' [1] -T2 loses the race to acquire 'a' [2] and also wants to acquire 'c' [1] -T3 loses the race to acquire 'a' [2] and also wants to acquire 'd' [1] So then in [3] we have: -T1 tries to acquire 2 permits -T2 tries to acquire 1 permit -T3 tries to acquire 1 permit Suppose the execution order in [3] is T2, T3, T1. So that means we then have T1 still at [3] and both T2 and T3 at [4], which is a deadlock. [1] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L184 [2] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L191 [3] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L199 [4] https://github.com/bazelbuild/bazel/blob/fa96b04f6c8ca6b6b3464727672267133e852959/src/main/java/com/google/devtools/build/lib/concurrent/MultisetSemaphore.java#L210 -- PiperOrigin-RevId: 148272171 MOS_MIGRATED_REVID=148272171
* Allow absolute symlinks in TreeArtifacts. Let the downstream action (if ↵Gravatar Janak Ramakrishnan2017-02-23
| | | | | | | | there is one) worry about it. -- PiperOrigin-RevId: 148249223 MOS_MIGRATED_REVID=148249223
* Add detailed rule class/label info when report attribute checking error Gravatar Liangliang He2017-02-22
| | | | | | | | | | | This PR addresses comment by @gregestren in https://github.com/bazelbuild/bazel/pull/2531 Closes #2546. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2546 PiperOrigin-RevId: 148201730 MOS_MIGRATED_REVID=148201730
* If dynamic configurations are turned on, ruleclass configuration transitionsGravatar Cal Peyser2017-02-22
| | | | | | | | apply on the top level. -- PiperOrigin-RevId: 148155171 MOS_MIGRATED_REVID=148155171
* Skylark documentation pipeline automatically generates documentation for all ↵Gravatar Florian Weikert2017-02-22
| | | | | | | | | | Skylark modules. With this change, we no longer have to manually register modules whose generation should be generated. Manual registration turned out to be prone to errors since engineers didn't know about it or simply forgot to register their modules. As a result, we had ~20 modules that featured nice documentation texts, but that were not being picked up by the documentation pipeline. -- PiperOrigin-RevId: 148136776 MOS_MIGRATED_REVID=148136776
* Rollback of commit e49886c55a7e2cfd6dd1fc52b037dc2d5a6ca019.Gravatar Adam Michael2017-02-22
| | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix for android_integration_test.sh. android_integration_test.sh should no longer make assumptions about the SDK api_level that is installed. Note that it does still assume NDK api_level 24 and support libraries 24.0.0 and android_sdk_repository itself requires build_tools_version >= 24.0.3. I will try and loosen the first two of those dependencies of this test at some point. -- PiperOrigin-RevId: 148130764 MOS_MIGRATED_REVID=148130764
* Augmented assignments don't evaluate lhs multiple timesGravatar Vladimir Moskva2017-02-21
| | | | | | -- PiperOrigin-RevId: 148092963 MOS_MIGRATED_REVID=148092963
* Move Classpath.java from src/test/... to src/main/... since it will be used ↵Gravatar Florian Weikert2017-02-21
| | | | | | | | by the documentation generation in the future. -- PiperOrigin-RevId: 148081562 MOS_MIGRATED_REVID=148081562
* parseBuildString doesn't crash on files with hash lines.Gravatar Carmi Grushko2017-02-21
| | | | | | -- PiperOrigin-RevId: 148042501 MOS_MIGRATED_REVID=148042501
* Raise error in function calls when star argument is not iterableGravatar Laurent Le Brun2017-02-20
| | | | | | | | This was a bug, f(*4) was silently handled as f(). -- PiperOrigin-RevId: 148017021 MOS_MIGRATED_REVID=148017021
* Make android_ndk_repository api_level attribute optional.Gravatar Adam Michael2017-02-20
| | | | | | | | | | | | | If not specified, the highest api level in the NDK is used. This is one more step towards the goal of making android_{s,n}dk_repository better for our users in https://github.com/bazelbuild/bazel/issues/2284. RELNOTES: android_ndk_repository api_level attribute is now optional. If not specified, the highest api level in the ndk/platforms directory is used. -- PiperOrigin-RevId: 147868288 MOS_MIGRATED_REVID=147868288
* Improve AndroidSdkRepositoryTest.Gravatar Adam Michael2017-02-20
| | | | | | | | | | Also, remove some tests from android_integration_test.sh that are now covered by AndroidSdkRepositoryTest. This should hopefully reduce breakages of android_integration_test.sh that are not caught until the change makes its way to Jenkins. I haven't yet figured out how to move the environment variable settings tests into AndroidSdkRepositoryTest. -- PiperOrigin-RevId: 147864723 MOS_MIGRATED_REVID=147864723
* Progress on Skylarkified java_lite_proto_library.Gravatar Irina Iancu2017-02-20
| | | | | | | | | | * Exposed transitive_runtime_jars from the former black-box JavaProvider. * Added support for aliases. * Returned the runfiles from the Skylark rule of java_lite_proto_library. -- PiperOrigin-RevId: 147834471 MOS_MIGRATED_REVID=147834471
* Rollback of commit 4b73e972d909bcd533f2f9940f95a00b9b73bdde.Gravatar Dmitry Lomov2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/ *** Original change description *** Roll forward execroot change RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Cust... -- PiperOrigin-RevId: 147833177 MOS_MIGRATED_REVID=147833177
* Make the interface dynamic library builder a regular label instead of a ↵Gravatar Lukacs Berki2017-02-17
| | | | | | | | magic artifact. -- PiperOrigin-RevId: 147830857 MOS_MIGRATED_REVID=147830857
* Move FileAccessException to the vfs packageGravatar Ulf Adams2017-02-17
| | | | | | | | | | | | | | It was previously in unix, but also used from non-unix file systems, which means it's not actually unix-specific. This is in preparation for splitting compilation of the unix and windows file systems into separate libraries. That improves layering and reduces compile times - note that Bazel already injects the vfs into its lower layers, which should only rely on the normal vfs APIs, not on anything platform-specific. -- PiperOrigin-RevId: 147829659 MOS_MIGRATED_REVID=147829659
* Do not sort dict keys when printingGravatar Vladimir Moskva2017-02-17
| | | | | | | | | | Dict keys can in theory belong to different types, it's not allowed anymore to compare such objects by < in Skylark, so the Printer class shouldn't do it either. -- PiperOrigin-RevId: 147827109 MOS_MIGRATED_REVID=147827109
* --proto_compiler points at @com_google_protobuf//:protocGravatar Carmi Grushko2017-02-17
| | | | | | | | This allows proto_library to be used out of the box by adding a repository entry that points to the protobuf distro in one's WORKSPACE file. -- PiperOrigin-RevId: 147808147 MOS_MIGRATED_REVID=147808147
* Migrate to java_runtime{,_suite}Gravatar Liam Miller-Cushon2017-02-17
| | | | | | -- PiperOrigin-RevId: 147727032 MOS_MIGRATED_REVID=147727032
* Rollback of commit 8fb311b4dced234b2f799c16c7d08148619f4087.Gravatar Dmitry Lomov2017-02-16
| | | | | | | | | | | | | | | | *** Reason for rollback *** Bisected by dmarting as a root cause of TF breakage: http://ci.bazel.io/job/TensorFlow/672/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Reinstate idleness checks where the server self-terminates when it's idle and there is either too much memory pressure or the workspace directory is gone. Arguably, it should kill itself when the workspace directory is gone regardless of whether it's idle or not, but let's first get us back to a known good state, then we can think about improvements. -- PiperOrigin-RevId: 147726386 MOS_MIGRATED_REVID=147726386
* Roll forward execroot changeGravatar Kristina Chodorow2017-02-16
| | | | | | | | | | | | | | | | | RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Custom crosstools that hardcode external/<repo> paths will have to be updated. Issue #1262. -- PiperOrigin-RevId: 147726370 MOS_MIGRATED_REVID=147726370
* Global cleanup change.Gravatar Liam Miller-Cushon2017-02-16
| | | | | | -- PiperOrigin-RevId: 147725849 MOS_MIGRATED_REVID=147725849
* Skip computing digests when --use_action_cache=false.Gravatar Googler2017-02-16
| | | | | | | | | | | | | Does this by delegating responsibility for constructing ActionCache.Entry instances to the ActionCache, and having the StubActionCache return null. Tests show a 1-2% elapsed-time reduction for clean builds: [] Doesn't use interface default methods, because we still need JDK7 for Mac. -- PiperOrigin-RevId: 147722062 MOS_MIGRATED_REVID=147722062
* Disallow comparison of objects of different types in SkylarkGravatar Vladimir Moskva2017-02-16
| | | | | | | | | | RELNOTES[INC]: It's not allowed anymore to compare objects of different types (i.e. a string to an integer) and objects for which comparison rules are not defined (i.e. a dict to another dict) using order operators. -- PiperOrigin-RevId: 147710942 MOS_MIGRATED_REVID=147710942
* Generate documentation for bool and int types.Gravatar Laurent Le Brun2017-02-15
| | | | | | | | | This improves consistency in the documentation (string and list already have their own page). -- PiperOrigin-RevId: 147599068 MOS_MIGRATED_REVID=147599068
* Windows: use JNI CreateJunction in Java code Gravatar Laszlo Csomor2017-02-15
| | | | | | | | | | | | | | | | Use the new CreateJunction in the Windows JNI code every time we need to create junctions. This means updating WindowsFileOperations and related tests. Add test for WindowsFileSystem.createSymbolicLink. See https://github.com/bazelbuild/bazel/issues/2238 -- Change-Id: I5827e2e70e8e147f5f102fabf95fa9a148b3bcdc Reviewed-on: https://cr.bazel.build/8896 PiperOrigin-RevId: 147598107 MOS_MIGRATED_REVID=147598107
* Bump up the time we are willing to wait for gRPC to start up in GrpcServerTests.Gravatar Lukacs Berki2017-02-15
| | | | | | | | Our Jenkins slaves are apparently slower than our workstations, thus, they are timeout-flaky. -- PiperOrigin-RevId: 147590913 MOS_MIGRATED_REVID=147590913
* Early support for code generation directly from C++ module files. This canGravatar Googler2017-02-15
| | | | | | | | | | | | potentially reduce the linker input. The content of a C++ module (specifically the inline definitions) is currently put into every single .o file that uses them and thus can be input to the same final link many times. By generating a separate .o file for the module itself, we can avoid this unnecessary duplication of linker input. -- PiperOrigin-RevId: 147579947 MOS_MIGRATED_REVID=147579947
* Skylark repositories: add FileValue hash codes to the marker file Gravatar Damien Martin-Guillerez2017-02-15
| | | | | | | | | | | | | | So that change to those files are seen and cause a refetch. Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 5] Fixes #1022. -- Change-Id: Ic75f2c9c59a4c91ff3e937ca21b37e74332c03ec Reviewed-on: https://cr.bazel.build/8218 PiperOrigin-RevId: 147574856 MOS_MIGRATED_REVID=147574856
* Restrict aspects visible to other aspects according to their advertised ↵Gravatar Dmitry Lomov2017-02-15
| | | | | | | | providers. -- PiperOrigin-RevId: 147526961 MOS_MIGRATED_REVID=147526961
* Remove type checking requirement from AttributeMap.has.Gravatar Greg Estren2017-02-15
| | | | | | | | | | | | | | This overrides the traditional has(String name, Type<>T> type) with has(String name) and removes the type check outright from isConfigurable. Ideally we'd remove the old version in this same change. But there are enough uses of it that that's not a risk-free change and is safer as followup changes. -- PiperOrigin-RevId: 147513593 MOS_MIGRATED_REVID=147513593
* BuildFileAST.eval() doesn't execute the code when there's a static error.Gravatar Laurent Le Brun2017-02-15
| | | | | | | | | | | This has no visible effect on Bazel (eval is used just for internal expressions that don't fail), and is therefore not tested. It will be tested when we add tests to the standalone Skylark interpreter. -- PiperOrigin-RevId: 147495990 MOS_MIGRATED_REVID=147495990
* Search for Test classes within the classpath used by the current ↵Gravatar Kush Chakraborty2017-02-15
| | | | | | | | | | | | classloader, instead of the system classpath. (2nd Attempt) Windows tests passed on Jenkins with this patch: http://ci.bazel.io/job/Gerrit-bazel-tests/380/, https://bazel-review.googlesource.com/c/8833 -- PiperOrigin-RevId: 147483103 MOS_MIGRATED_REVID=147483103
* Refactoring: Types report what class of labels they contain.Gravatar Michael Staib2017-02-14
| | | | | | | | | | | | | | | | | | | | | Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do exotic things based on the type. But most sites can avoid having to enumerate all the types they work with explicitly. This causes LABEL_DICT_UNARY to start being treated like the other label types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule need to include a set of allowed file types (none, in their case). Skylark will continue treating it as a dictionary from String to Label in its rule context, however, to avoid visible behavior changes. -- PiperOrigin-RevId: 147471542 MOS_MIGRATED_REVID=147471542
* Reinstate idleness checks where the server self-terminates when it's idle ↵Gravatar Lukacs Berki2017-02-14
| | | | | | | | | | and there is either too much memory pressure or the workspace directory is gone. Arguably, it should kill itself when the workspace directory is gone regardless of whether it's idle or not, but let's first get us back to a known good state, then we can think about improvements. -- PiperOrigin-RevId: 147454329 MOS_MIGRATED_REVID=147454329
* Remove special handling of name attribute. Fixes #278Gravatar Googler2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | The name attribute gets special treatment in the codebase, in that it's not simply yet another attribute but stored in it's own field. Thus, every callside dealing with attributes needs to be aware of this special case and explicitly handle the name attribute. It's easy to see that this can lead to bugs. For example, querying for the name attribute is currently broken due the querying code not being aware of the special case [1]. Discussions with experienced bazel developers came to the conclusion that there is no need (anymore) to treat the name attribute specially and thus we decided it's best to remove the special treatment and handle the name attribute as any other attribute. This change removes the handling of name attributes and also adds a test case to verify that bug [1] is fixed. [1] https://github.com/bazelbuild/bazel/issues/278 -- PiperOrigin-RevId: 147446345 MOS_MIGRATED_REVID=147446345
* Add a test to PackageFunctionTest confirming current glob behavior.Gravatar Janak Ramakrishnan2017-02-14
| | | | | | -- PiperOrigin-RevId: 147396952 MOS_MIGRATED_REVID=147396952
* Rollback of commit cdbad585187dfe7bbb4d69ad68a1baf852beb691.Gravatar Michael Staib2017-02-14
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Skylark aspects running over rules with LABEL_DICT_UNARY attributes. *** Original change description *** Refactoring: Types report what class of labels they contain. Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do... -- PiperOrigin-RevId: 147385072 MOS_MIGRATED_REVID=147385072
* Make tests that mess with the WORKSPACE file work with untrimmed dynamic ↵Gravatar Greg Estren2017-02-14
| | | | | | | | | | | | | | | | | | | | configs. They already work with static configs because those configs get created in test setup, before WORKSPACE is modified. That means they get the necessary bindings needed to load their fragments (e.g. local_config_xcode for AppleConfiguration). But dynamic configs get instantiated on-demand. Which means in this case *after* WORKSPACE is overwritten. So they can't find the bindings and fail. This fix has offending tests *append* WORKSPACE instead of overwrite. This unblocks defaulting --experimental_dynamic_configs to "notrim_partial". -- PiperOrigin-RevId: 147377195 MOS_MIGRATED_REVID=147377195
* Stop retrieving FdoSupport statically from hard-coded attribute ↵Gravatar Rumou Duan2017-02-14
| | | | | | | | | | ":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used. This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain". -- PiperOrigin-RevId: 147358325 MOS_MIGRATED_REVID=147358325
* Add an algorithm to reduce aspect paths according to aspects' visibility to ↵Gravatar Dmitry Lomov2017-02-14
| | | | | | | | | | | | each other. Aspects negotiate their visibility by advertizing and requiring providers. The algorithm is not used yet (that is future work). -- PiperOrigin-RevId: 147354682 MOS_MIGRATED_REVID=147354682
* Allow Skylark aspects to advertise providers.Gravatar Dmitry Lomov2017-02-14
| | | | | | -- PiperOrigin-RevId: 147350507 MOS_MIGRATED_REVID=147350507