aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* 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
* Update to javac9-r3297Gravatar Liam Miller-Cushon2016-12-08
| | | | | | -- PiperOrigin-RevId: 141396618 MOS_MIGRATED_REVID=141396618
* 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
* Description redacted.Gravatar Kristina Chodorow2016-12-07
| | | | | | -- PiperOrigin-RevId: 141325412 MOS_MIGRATED_REVID=141325412
* 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
* Fix #2199: bazel_worker_test fails with syntax error on Darwin.Gravatar Philipp Wollermann2016-12-07
| | | | | | -- PiperOrigin-RevId: 141300487 MOS_MIGRATED_REVID=141300487
* move MakeDirectories() into file_platform.hGravatar Thiago Farina2016-12-07
| | | | | | | | | | | | | | This way we can remove the dependency on blaze_util (which is Bazel's client specific) from singlejar. This work was made possible by commit 49970e0136d0: ("Bazel client: platform-specific {Read,Write}File"). -- Change-Id: I6e95fb9119a271e4d48cbe2eefc1d5354ee188aa Reviewed-on: https://cr.bazel.build/7650 PiperOrigin-RevId: 141294165 MOS_MIGRATED_REVID=141294165
* 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 14e35546302a48d1074bc2456ef4d63c27c9d3a1.Gravatar Adam Michael2016-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes to android_integration_test.sh. The test now uses the new syntax for the Support Library AARs. All CIs that have been created since last December should have this library installed due to https://github.com/bazelbuild/continuous-integration/blob/master/mac/mac-android.sh#L36. *** Original change description *** Automated [] rollback of commit f699b502ef6a57dc68570486191ad1c318e8fd1b. *** Reason for rollback *** Breaks android_integration_test.sh which relies on the old targets. I don't have time to update the test to use the new targets at the moment, so rolling the change back for now. https://github.com/bazelbuild/bazel/issues/2159 RELNOTES: -- PiperOrigin-RevId: 141233182 MOS_MIGRATED_REVID=141233182
* 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
* Mount TreeArtifact directories as inputs to Spawns.Gravatar Adam Michael2016-12-06
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/1928. -- PiperOrigin-RevId: 141077737 MOS_MIGRATED_REVID=141077737
* 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
* Mark //src/test/shell/bazel:bazel_windows_example_test as manualGravatar Damien Martin-Guillerez2016-12-05
| | | | | | | | This test has became flaky due to long path, see #2178 -- PiperOrigin-RevId: 141044418 MOS_MIGRATED_REVID=141044418
* Add instructions regarding running android_integration_test.Gravatar Irina Iancu2016-12-05
| | | | | | -- PiperOrigin-RevId: 141039788 MOS_MIGRATED_REVID=141039788
* 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
* Make build events correctly report target expansionGravatar Klaus Aehlig2016-12-05
| | | | | | | | | | | In particular, correctly report the expansion of a test suite even if only requested to build (but not test). -- Change-Id: Ia25305a4f5ed53118cbb1970a8055d156e8e50be Reviewed-on: https://cr.bazel.build/7535 PiperOrigin-RevId: 141027655 MOS_MIGRATED_REVID=141027655
* 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
* Make the settings attribute of Skylark maven_jar and maven_aar a label.Gravatar Adam Michael2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2117. The settings attribute allows you to optional specify a custom Maven settings.xml file as a label. Previously, this attribute was an absolute path. As an absolute path it cannot really be used to specify a file in the workspace because each developer may install the workspace in a different location. And if the settings.xml cannot be included in the workspace, the developers may as well use one of Maven's default locations for settings.xml. Now the attribute is a label. An example use case is: $ cat WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl") maven_jar( name = "guava", artifact = "com.google.guava:guava:19.0", settings = "//:my_custom_settings.xml", ) $ cat BUILD java_library( srcs = glob(["**/*.java"]), deps = ["@guava//jar"], ) $ cat my_custom_settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <mirrors> <mirror> <id>planetmirror.com</id> <name>PlanetMirror Australia</name> <url>http://downloads.planetmirror.com/pub/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings> Note that `settings = "my_custom_settings.xml"` will not work as the workspace rule will not know to look in the main workspace. RELNOTES[INC]: Skylark maven_jar and maven_aar settings attribute is now a label so it can be checked into your workspace. -- PiperOrigin-RevId: 140861633 MOS_MIGRATED_REVID=140861633
* 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
* Add support for rules_test on rules in a different repository or in theGravatar John Cater2016-12-01
| | | | | | | | | root package. -- Change-Id: Ibbc4119ec65c27ad1f85a74450815195d18f5128 Reviewed-on: https://cr.bazel.build/7571 MOS_MIGRATED_REVID=140625048
* Use MessageDigest instead of HashFunction for FingerprintGravatar Michajlo Matijkiw2016-12-01
| | | | | | | | | This allows us to reset and reuse the underlying digest implementation, which guava's HashFunction doesn't allow. We do take the clone-if-possible page out of guava's book. -- MOS_MIGRATED_REVID=140624836
* Allow aspects to specify multiple sets of required providers to match ↵Gravatar Rumou Duan2016-12-01
| | | | | | | against rules. Aspects can attach to a rule if at least one set of required providers are present on the rule. -- MOS_MIGRATED_REVID=140605023