aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Streamline Fingerprint implementationGravatar Michajlo Matijkiw2016-12-15
| | | | | | | | | | | | Thread all updates through a CodedOutputStream. This has the benefit of potentially hashing less data, as many int values can be represented more compactly, and reducing the churn of hashing strings (generally), since CodedOutputStream is already heavily optimized for this. While the buffer size is a little generous, it winds up paying off. -- PiperOrigin-RevId: 142151062 MOS_MIGRATED_REVID=142151062
* New operators for Skylark:Gravatar Andreas Bergmeier2016-12-15
| | | | | | | | | | | | | - list * int - int * list RELNOTES[NEW]: Skylark: you can now multiply a list by an integer to get the concatenation of N copies of this list, e.g. [a,b] * 3 = [a,b,a,b,a,b] -- Change-Id: I2068ad30e11df26dc7b4b8c41e51f85db56f0390 Reviewed-on: https://github.com/bazelbuild/bazel/pull/1524 PiperOrigin-RevId: 142140726 MOS_MIGRATED_REVID=142140726
* Windows, JNI: implement nativeGetLongPathGravatar Laszlo Csomor2016-12-15
| | | | | | | | | | | | | | | | | | | | Implement a JNI method that can resolve 8dot3 style paths. This is necessary because we need to be able to compare 8dot3 style paths and long paths [1], and because implementing this correctly in Java seems to be impossible [2]. This change also adds tests for the JNI isJunction implementation. See https://github.com/bazelbuild/bazel/issues/2101 [1] https://github.com/bazelbuild/bazel/issues/2145 [2] https://github.com/bazelbuild/bazel/issues/2145#issuecomment-266766716 -- PiperOrigin-RevId: 142123750 MOS_MIGRATED_REVID=142123750
* Fix repositories to use 'BUILD.bazel' as the name for the symlinked/new ↵Gravatar John Cater2016-12-13
| | | | | | | | | | build file, which has less changes of causing conflicts. Fixes #2226. -- Change-Id: I4a378d693004d4d6857c78d7ffe886ada3fb9239 Reviewed-on: https://cr.bazel.build/7850 PiperOrigin-RevId: 141909918 MOS_MIGRATED_REVID=141909918
* Fix error message that gives incomplete informationGravatar Jon Brandvein2016-12-13
| | | | | | -- PiperOrigin-RevId: 141896569 MOS_MIGRATED_REVID=141896569
* Propagate all providers from CcLibraryHelper into cc_proto_library.Gravatar Carmi Grushko2016-12-13
| | | | | | | | Previously, at least one critical provider was not propagated (CppCompilationContext) which resulted in cc_library's being unable to find the generated headers. -- PiperOrigin-RevId: 141800408 MOS_MIGRATED_REVID=141800408
* Add tuple() method to Skylark.Gravatar Googler2016-12-12
| | | | | | | | This method coerces any collection to a Skylark tuple, analogous to list() or set(). -- PiperOrigin-RevId: 141779268 MOS_MIGRATED_REVID=141779268
* Migrates TestEnvironmentProvider to using the new Skylark declared providers ↵Gravatar Sergio Campama2016-12-12
| | | | | | | | API. This enables creating a TestEnvironmentProvider from Skylark. -- PiperOrigin-RevId: 141775285 MOS_MIGRATED_REVID=141775285
* Style edits for ActionsProvider and provider constructorsGravatar Jon Brandvein2016-12-12
| | | | | | -- PiperOrigin-RevId: 141769552 MOS_MIGRATED_REVID=141769552
* Strict proto deps: .proto files are allowed to import other .proto files in ↵Gravatar Carmi Grushko2016-12-12
| | | | | | | | the same srcs as they are. -- PiperOrigin-RevId: 141604925 MOS_MIGRATED_REVID=141604925
* Add a testing Skylark module that exposes an ExecutionInfoProvider constructor.Gravatar Sergio Campama2016-12-12
| | | | | | -- PiperOrigin-RevId: 141594768 MOS_MIGRATED_REVID=141594768
* Names of extra-action protos now take into account aspect names.Gravatar Carmi Grushko2016-12-12
| | | | | | | | | | That is, if an Aspect registered an action that an extra-action is shadowing, its name will be used when creating the extra-action's ID and name. Without this change, it's impossible to analyze extra-actions when there's more than one aspected rule that acts on the same rule (e.g., java_proto_library and java_lite_proto_library on the same proto_library). -- PiperOrigin-RevId: 141587608 MOS_MIGRATED_REVID=141587608
* Simplify propagation of linker params by replacing global_whole_archive withGravatar Marcel Hlopko2016-12-09
| | | | | | | | individual --whole_archive/--no_whole_archive blocks. -- PiperOrigin-RevId: 141555295 MOS_MIGRATED_REVID=141555295
* Transparently compress any FileWriteAction strings of > 256 length.Gravatar Googler2016-12-08
| | | | | | | | This should save on heap space for actions with long strings. -- PiperOrigin-RevId: 141440705 MOS_MIGRATED_REVID=141440705
* Clean up after transition of java_xxx_proto_library rules to proto-toolchains.Gravatar Carmi Grushko2016-12-07
| | | | | | | | | This hardcodes usage of proto-toolchains, which triggers strict-proto-deps. Since strict-proto-deps relies on a proto-compiler feature which doesn't exist yet, I've also changed the default of --strict_proto_deps to 'default', which won't trigger the check unless specifically requested. -- PiperOrigin-RevId: 141347426 MOS_MIGRATED_REVID=141347426
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-07
| | | | | | | | | | | | | | | | Roll forward after fixing tests. Changes from rolled-back CL: Native aspect now determines 'isExternal' identically to skylark aspect. RepositoryName.isMain was unreliable (at least in testing environment), because unknown repos (occurring due to some race condition) are flagged as being in the 'default' repo, distinct from the 'main' repo. We now bypass RepositoryName entirely, and use the same label string heuristic as used in the Skylark aspect. -- PiperOrigin-RevId: 141314075 MOS_MIGRATED_REVID=141314075
* Provide deterministic order for split configured deps (roll forward part 2).Gravatar Greg Estren2016-12-07
| | | | | | | | | | | | | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed for two reasons: 1) Windows-only: "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 2) Bazel requires android_binary's "manifest" attribute to be "AndroidManifest.xml": https://www.google.com/url?sa=D&q=http%3A%2F%2Fci.bazel.io%2Fjob%2Fbazel-tests%2FBAZEL_VERSION%3DHEAD%2CPLATFORM_NAME%3Dubuntu_15.10-x86_64%2FlastCompletedBuild%2FtestReport%2F This version uses "armeabi-v7a" instead of "ppc" and "AndroidManifest.xml" in the splitDeps test. -- PiperOrigin-RevId: 141313454 MOS_MIGRATED_REVID=141313454
* Global cleanup change.Gravatar Googler2016-12-07
| | | | | | -- PiperOrigin-RevId: 141307853 MOS_MIGRATED_REVID=141307853
* Add coverage support for java test.Gravatar Yue Gan2016-12-07
| | | | | | | | (series 4/4 of open-sourcing coverage command for java test) -- PiperOrigin-RevId: 141292977 MOS_MIGRATED_REVID=141292977
* decide whether to strip binaries only onceGravatar Marcel Hlopko2016-12-07
| | | | | | | | | | | | CppConfiguration's constructor was computing whether to strip binaries twice: once to fill the stripBinaries member and once to fill a local variable that shadowed the member. Doing only the former suffices. -- Change-Id: I20f61e71572da79e0ec315b01c04b13f4fb14960 Reviewed-on: https://cr.bazel.build/6390 PiperOrigin-RevId: 141285267 MOS_MIGRATED_REVID=141285267
* Rollback of commit 12d766df10fbc5eba16ec1e6c20c8cd85f9c616f.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Still fails bazel-tests See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=ubuntu_15.10-x86_64/lastCompletedBuild/testReport/ for instance *** Original change description *** Provide deterministic order for split configured deps (roll forward) Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed on Windows because "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 This version uses "armeabi-v7a" instead. -- PiperOrigin-RevId: 141212457 MOS_MIGRATED_REVID=141212457
* Windows JNI library: prepare for widechar WinAPIGravatar Laszlo Csomor2016-12-06
| | | | | | | | | | | | | | | | | | This change: - renames windows_error_handling.* to windows_util.* - moves most stuff except for the JNI method implementations into the new windows_util namespace - implements a jstring to wchar string converter - uses GetFileAttributesW in windows_file_operations.cc See https://github.com/bazelbuild/bazel/issues/2181 -- PiperOrigin-RevId: 141187291 MOS_MIGRATED_REVID=141187291
* Provide deterministic order for split configured deps (roll forward)Gravatar Greg Estren2016-12-06
| | | | | | | | | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. This is a roll forward of commit 7505d94c19727e3100ac5e16a960bff2cb324f23. The original changed failed on Windows because "ppc" wasn't recognized as a valid cpu: https://github.com/bazelbuild/bazel/issues/2191 This version uses "armeabi-v7a" instead. -- PiperOrigin-RevId: 141185293 MOS_MIGRATED_REVID=141185293
* Bazel uses apksigner from SDK build-tools instead of embedded jar.Gravatar Adam Michael2016-12-06
| | | | | | | | | | | | A followup change will remove the apksigner jar that is bundled with Bazel. RELNOTES: Bazel Android builds use the apksigner tool from the Android SDK build-tools. Bazel Android builds now require build-tools version 24.0.3 or later. -- PiperOrigin-RevId: 141181612 MOS_MIGRATED_REVID=141181612
* Fix private visibility for aliased targets. Gravatar Lukacs Berki2016-12-06
| | | | | | | | | | Also a drive-by improvement on some related error messages. RELNOTES[INC]: Only targets with public visibility can be bound to something in //external: . -- PiperOrigin-RevId: 141178039 MOS_MIGRATED_REVID=141178039
* If a worker returns unparseable output, print it to the terminal.Gravatar Philipp Wollermann2016-12-06
| | | | | | | | When a persistent worker returns a WorkResponse that cannot be parsed by protobuf, it probably means that the worker has encountered an error and mistakenly printed a stack trace or error message to stdout. For users who want to know why their compiler crashes and for developers of tools that support the worker mode, it is extremely helpful to actually see these error messages, so let's print them. -- PiperOrigin-RevId: 141176835 MOS_MIGRATED_REVID=141176835
* Rollback of commit 84e7bbc03d22a98e1036c9a3abf1d451e602348b.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** This change make AndroidStudioInfoAspectTest#testAndroidLibrary flaky bazel test --nocache_test_results --runs_per_test 10 //src/test/java/com/google/devtools/build/lib:ideinfo_test gives 2 to 3 failures out of 10 run. Fixes #2192 *** Original change description *** Pass isExternal field to blaze ide info proto Roll forward after fixing tests. The intellij aspect tests now correctly retains the required toolchain targets in the WORKSPACE file. -- PiperOrigin-RevId: 141174688 MOS_MIGRATED_REVID=141174688
* Rollback of commit 7505d94c19727e3100ac5e16a960bff2cb324f23.Gravatar Damien Martin-Guillerez2016-12-06
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Newly added test fail on Windows platform Fixes https://github.com/bazelbuild/bazel/issues/2191 *** Original change description *** Provide deterministic order for split configured deps. Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. -- PiperOrigin-RevId: 141167110 MOS_MIGRATED_REVID=141167110
* Provide deterministic order for split configured deps.Gravatar Greg Estren2016-12-06
| | | | | | | | | | Also: - Make ConfiguredTargetFunction.getDynamicConfigurations more readable. - Add a bit more testing coverage for configured dep resolution. -- PiperOrigin-RevId: 141095973 MOS_MIGRATED_REVID=141095973
* Override BuildConfiguration.equals() for dynamic configs.Gravatar Greg Estren2016-12-06
| | | | | | | | | | | | | | | | This makes tests that unnecessarily relied on reference equality pass with --experimental_dynamic_configs=notrim. In particular, with --nodistinct_host_configuration dynamic configurations still use distinct instances even though the options are the same. This is a roll forward of original change: https://github.com/bazelbuild/bazel/commit/2a2be3907981d9654575493c7012d95d1241f373 That was rolled back because of lots of expensive hashCode() calls. This version precomputes the hash code. -- PiperOrigin-RevId: 141095789 MOS_MIGRATED_REVID=141095789
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-06
| | | | | | | | | Roll forward after fixing tests. The intellij aspect tests now correctly retains the required toolchain targets in the WORKSPACE file. -- PiperOrigin-RevId: 141093346 MOS_MIGRATED_REVID=141093346
* Add 'aspect_id' for to identify aspects that has been applied to the target.Gravatar Dmitry Lomov2016-12-05
| | | | | | | | | | | | | | | | | | | Add a concept of aspect_id: an unique string that identifies a propagating aspect (aspect class + parameters). This string is designed to be: - Unique for each aspect - human-readable for debugging purposes - not easily parsable. Skylark API: - `ctx.aspect_id` returns an identifier of the current aspect inside aspect implementation function - `Target.aspect_ids` return a list of aspect ids for aspects applied to a given Target (https://www.bazel.io/versions/master/docs/skylark/lib/Target.html) -- PiperOrigin-RevId: 141057865 MOS_MIGRATED_REVID=141057865
* Allow dicts to contain non-comparable objects as keysGravatar Vladimir Moskva2016-12-05
| | | | | | | | | RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept any hashable values (i.e. structs with immutable values) as keys. Iteration order of dictionaries is no longer specified. -- PiperOrigin-RevId: 141055080 MOS_MIGRATED_REVID=141055080
* Rollback of commit 9de9f374cf63e8e6938c9ce80820c9f46f641241.Gravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke ci.bazel.io See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD-jdk7,PLATFORM_NAME=linux-x86_64/379/console for error log. See https://cr.bazel.build/7610/ for tests that confirm fix. *** Original change description *** Pass isExternal field to blaze ide info proto -- Change-Id: Ieff9fbc719ea7baf8321bf50570fae5f7d6c7fdd Reviewed-on: https://cr.bazel.build/7610 PiperOrigin-RevId: 141029777 MOS_MIGRATED_REVID=141029777
* Add strip_prefix and strip_include_prefix attributes of cc_library.Gravatar Lukacs Berki2016-12-05
| | | | | | | | | | Design doc is at https://docs.google.com/document/d/18qUWh0uUiJBv6ZOySvp6DEV0NjVnBoEy-r-ZHa9cmhU . RELNOTES: cc_library now supports the strip_prefix and strip_include_prefix attributes for control of include paths. -- PiperOrigin-RevId: 140950225 MOS_MIGRATED_REVID=140950225
* Fix NPE in RClassGenerator when dev has code in unnamed packageGravatar Googler2016-12-05
| | | | | | | | | | | | | | | | | | | | Just put the R class in the unnamed package. If we disable the RClassGenerator and use the old code path, we would have constructed a cmdline flag set to "null" for aapt, and aapt would write "package null;" which also wouldn't work... This may allow you to build an android_library but it may be hard to build an android_binary because ultimately AAPT will reject an empty "package" attribute in the AndroidManifest.xml when you try to build the APK, so you'd need to stamp that differently. -- PiperOrigin-RevId: 140945125 MOS_MIGRATED_REVID=140945125
* When a strict proto dep violation occurs, tell the user what they should fix.Gravatar Carmi Grushko2016-12-05
| | | | | | -- PiperOrigin-RevId: 140912072 MOS_MIGRATED_REVID=140912072
* Fix another test that instantiates BuildOptions its own special way.Gravatar Greg Estren2016-12-05
| | | | | | | | | Since this is a narrowly defined test specifically for C++ configs, this case makes some more sense. -- PiperOrigin-RevId: 140891377 MOS_MIGRATED_REVID=140891377
* Make a rogue test case honor --experimental_dynamic_configs=notrim_partial ↵Gravatar Greg Estren2016-12-05
| | | | | | | | | | like everywhere else. Unfortunately this doesn't use ConfiguredRuleClassProvider to prepare its configuration's BuildOptions like every other code path does. -- PiperOrigin-RevId: 140873428 MOS_MIGRATED_REVID=140873428
* Pass isExternal field to blaze ide info protoGravatar Googler2016-12-02
| | | | | | -- PiperOrigin-RevId: 140862659 MOS_MIGRATED_REVID=140862659
* Introduce FlagGroup.expandIfTrue, expandIfFalseGravatar Marcel Hlopko2016-12-02
| | | | | | | | | | This cl adds support for expand_if_true and expand_if_false messages to the flag_group, allowing more elegant design of build variables. This cl also adds IntegerValue VariableValue subclass. -- PiperOrigin-RevId: 140849578 MOS_MIGRATED_REVID=140849578
* Clean up RuleContext's attribute access API.Gravatar Greg Estren2016-12-02
| | | | | | | | | | | | | | | All calls now go through RuleContext.attributes(), which guarantees both native and aspect-supplied attributes are checked. For aspect attributes, only type queries are supported (e.g. "does this attribute exist?", "what is its type?"). Not value queries. This is because the code this is cleaning up accesses aspect attributes through a String->Attribute map, which doesn't include values. If ever needed we could further extend with something more robust. -- MOS_MIGRATED_REVID=140771242
* Move constraint enforcement policy into attribute definitions.Gravatar Greg Estren2016-12-02
| | | | | | | | | This makes is easier to understand and change which attributes are checked. Also turn off checking for "data" and java_* "resources" attributes. -- MOS_MIGRATED_REVID=140771015
* Compute module file compile command line flags right before executing theGravatar Googler2016-12-02
| | | | | | | | | | | | action. This removes flattening of nested sets (for the transitive/top-level header modules) in the analysis phase making it about 10% faster. Also remove the calculation of top-level modules entirely as it doesn't seem to be necessary and doing it might actually lead to unexpected results when actions are restored from cache and thus the module input flags are computed from the actually used inputs (determined from .d files). -- MOS_MIGRATED_REVID=140738461
* Replace UnixGlob's package glob prefetching functionality with anGravatar Googler2016-12-02
| | | | | | | | optional method in FileSystem. Custom FileSystem implementations can use this to provide their own implementation of glob prefetching. -- MOS_MIGRATED_REVID=140736304
* Phrasing cleanup for dynamic configuration tests.Gravatar Greg Estren2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140729772
* Rollback of commit 2a2be3907981d9654575493c7012d95d1241f373.Gravatar Googler2016-12-01
| | | | | -- MOS_MIGRATED_REVID=140721733
* Rollback of commit c182908910a370b490e7e027b867e11f9f2fb086.Gravatar Michajlo Matijkiw2016-12-01
| | | | | | | *** Reason for rollback *** -- MOS_MIGRATED_REVID=140687884
* Initial commit of cc_proto_library.Gravatar Carmi Grushko2016-12-01
| | | | | | | RELNOTES: cc_proto_library generates C++ code from proto_library rules. -- MOS_MIGRATED_REVID=140680034
* Overrides BuildConfiguration.equals() for dynamic configs.Gravatar Greg Estren2016-12-01
| | | | | | | | | This makes ConstraintsTest#hostDependenciesNotCheckedNoDistinctHostConfiguration pass with --experimental_dynamic_configs=notrim (the host config is the same as the target config but it's still a separate instance). -- MOS_MIGRATED_REVID=140652716