aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* AutoValue and SkylarkClassObject interact badly, so remove that.Gravatar John Cater2017-04-24
| | | | | | | | | | | Because SkylarkClassObject declares equals, hashCode, and toString, AutoValue doesn't bother creating those, but since these classes didn't pass any data back to SkylarkClassObject, the defined methods don't work properly. This shows up as all instances of a class having the same hashCode and being equals() to each other. Change-Id: I50734f04369231cd2141dd368b04a3f0997a7d18 PiperOrigin-RevId: 153735995
* Fix bazel_toolchain_testGravatar ulfjack2017-04-24
| | | | | | It's failing with sandboxing. PiperOrigin-RevId: 153720082
* Enabling chunking of outputs in the RemoteWorker downloadBlob. This fixes ↵Gravatar olaola2017-04-24
| | | | | | | | | the bug that the RemoteWorker would fail to upload outputs that were too big to send in a single gRPC message. Fixes #2822. RELNOTES: n/a PiperOrigin-RevId: 153710733
* Fix tests to create WORKSPACE files for local repositories.Gravatar John Cater2017-04-24
| | | | | | | Part of #2841. Change-Id: I4d1e63aac6b5ed6beb9854b9b67d2899d8da4418 PiperOrigin-RevId: 153705466
* Rewrite repository lookup to return a failed value rather than throwGravatar ulfjack2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | We need to lookup repositories as part of converting exec paths to artifacts, which in turn is needed for action cache lookups. These lookups should not cause a Skyframe exit, so we must not throw an exception here, unless the error makes it impossible to continue. Instead, we need to leave the decision whether to error out or not to the caller. Note that we may unnecessarily fetch a remote repository in order to do the action cache lookup, even if the action no longer depends on the input file, although this should only be possible for C++ compile actions. It's possible that there's another bug in the C++ compile action key computation that also contributes. This change also makes it so that the post-resolution action cache code ignores any errors wrt. repository lookup rather than throwing. If any of the paths could not be found, then the action cache lookup fails and we re-execute the corresponding action, which is exactly what should happen. Fixes #2759. PiperOrigin-RevId: 153696243
* Automated g4 rollback of commit 3217832d638f9a8fdf22e88e32d75bda32ff7235.Gravatar corysmith2017-04-20
| | | | | | | | | | | | | *** Reason for rollback *** Causes issues with library R generation. *** Original change description *** Refactor the RClassGenerator to be reusable for different packages. RELNOTES: None PiperOrigin-RevId: 153641485
* Refactor the RClassGenerator to be reusable for different packages.Gravatar corysmith2017-04-20
| | | | | RELNOTES: None PiperOrigin-RevId: 153619067
* Prepare dynamic LIPO transitions.Gravatar gregce2017-04-20
| | | | | | | | Add a dynamic equivalent for LIPO_COLLECTOR transition. Rename LipoDataTransition (which handles DATA transition) to DisableLipoTransition. A future change will add a corresponding EnableLipoTransition (which will model TARGET_CONFIG_FOR_LIPO). PiperOrigin-RevId: 153611898
* Don't hard remove --no_, give a warning first.Gravatar ccalvarin2017-04-20
| | | | PiperOrigin-RevId: 153610163
* Add a way of constructing OptionsBase subclass instances from mapsGravatar brandjon2017-04-20
| | | | | | | Added toMap()/fromMap() to OptionsParser, and moved the implementation of OptionsBase#asMap away from OptionsParserImpl. RELNOTES: None PiperOrigin-RevId: 153602479
* OnePlatform auth support for Bazel, in preparation for next version of the API.Gravatar olaola2017-04-20
| | | | | | TESTED: local server RELNOTES: n/a PiperOrigin-RevId: 153599636
* Add repository override optionGravatar kchodorow2017-04-20
| | | | | | | | | | | RELNOTES: Adds a --override_repository option that takes a repository name and path. This forces Bazel to use the directory at that path for the repository. Example usage: `--override_repository=foo=/home/user/gitroot/foo`. Fixes #1266 PiperOrigin-RevId: 153599291
* Filter out conflicting flag policies before invocation policy enforcement.Gravatar ccalvarin2017-04-20
| | | | | | | | | | | | | This is to minimize the likelihood of obscure policy conflict. Now, the last policy on a flag (after policy expansion) will be the only one in the "canonical" invocation policy. There should be no reason for explicitly setting multiple policies on a single flag, but if an expansion flag is policy'd and one of its children has a more specific policy on it, make sure that the policy on the child flag is after the policy on the expansion flag. Note that this restriction (only the last policy gets applied) also applies for repeatable flags. Make sure all values being set to a repeatable flag are set in a single SetValue operation, with multiple flagValues set. PiperOrigin-RevId: 153584034
* Refer to the proper filegroup, not to a directoryGravatar ulfjack2017-04-20
| | | | | | | | | Without this change, //src/test/shell/bazel:bazel_toolchain_test is failing when remote caching is enabled. Workaround for #2845. PiperOrigin-RevId: 153574893
* Temporarily disable android testsGravatar Klaus Aehlig2017-04-19
| | | | | | | | ..until issue #2848 is fixed. In this way, they do not shadow new breakages on CI. Change-Id: I95ff1aafc1431cadf387119018dfd2443185e7db PiperOrigin-RevId: 153574737
* Support using minimized bitcode for ThinLTO LTO indexing stepGravatar Googler2017-04-19
| | | | | | | | This is the Blaze side of the support for emitting and using minimized bitcode files during the LTO indexing (thin link) step of a ThinLTO build. The llvm support has already been released to stable, and this needs to be submitted after the companion Crosstool support (unknown commit, will send for review once this larger part is reviewed). This enables large applications successfully build using ThinLTO and -g, otherwise the bitcode files that are input to the LTO indexing step are huge and the maximum input size is exceeded. PiperOrigin-RevId: 153549687
* RELNOTES: NoneGravatar ajmichael2017-04-19
| | | | PiperOrigin-RevId: 153545346
* Deprecate use of option category to describe documentation level / usage ↵Gravatar ccalvarin2017-04-19
| | | | | | | | restrictions. Prevent the old category strings "undocumented," "hidden," or "internal" from being used as categories, to prevent developers from relying on deprecated behavior. PiperOrigin-RevId: 153525499
* Fix crash on graph cycle in configuration loadingGravatar gregce2017-04-19
| | | | PiperOrigin-RevId: 153473961
* Remove some debugging code from bazel_coverage_test.sh .Gravatar lberki2017-04-19
| | | | | | | They were added in https://github.com/bazelbuild/bazel/commit/3a5d3db6436bbaf5351da9ea9c19a41ae7c95ca9 by Yours Truly. RELNOTES: None. PiperOrigin-RevId: 153468590
* Re-enable the Java coverage tests.Gravatar lberki2017-04-18
| | | | | | | | | It has been disabled in https://github.com/bazelbuild/bazel/commit/bce889840f91f14c05418d960984bcf1a5f59411 and in https://github.com/bazelbuild/bazel/commit/21fb8cac60c36cb527d6131ab0092bcdf138d99a and then was not re-enabled. Also update src/java_tools/junitrunner/java/com/google/testing/coverage/BUILD to which I accidentally submitted a change directly to our OSS repository. RELNOTES: None. PiperOrigin-RevId: 153460778
* Automated g4 rollback of commit 501b62716af12ba42c019bd9f231468b3c144757.Gravatar aehlig2017-04-18
| | | | | | | | | | | | | | | *** Reason for rollback *** Broke //src/test/shell/bazel:cc_inc_library_test on darwin see http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=darwin-x86_64/704/console *** Original change description *** Basic open-source crosstool to support targetting apple platform types. RELNOTES: None. PiperOrigin-RevId: 153460334
* Write stdout and stderr to the remote cacheGravatar ulfjack2017-04-18
| | | | | | | | | | Only write a cache entry when the spawn executed successfully, and with a 0 exit code. In the test, we only check that uploadFileContents is called exactly twice. Progress on #1413. PiperOrigin-RevId: 153458240
* Implement logging in LocalSpawnRunnerGravatar ulfjack2017-04-18
| | | | | | | | This is a prerequisite for Google to use it; there's no consistent logging strategy yet, but Google internally requires logging, and it needs to be somewhat backwards compatible. PiperOrigin-RevId: 153454160
* Generating PDB files on WindowsGravatar Yun Peng2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add /Z7 as compiler flag in CROSSTOOL, this causes full debugging infomation built into object files, no PDB file is generated. 2. Add /DEBUG as linker flag so that a PDB file will be generated for executable or dll. * /DEBUG:FULL for dbg mode. the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed. * /DEBUG:FASTLINK for fastbuild mode. object files are still needed when debugging the executable, but linking speed can be two to four times faster that full PDB generation. * No option is added for opt mode. More detailed info: https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx 3. Add an empty feature in MSVC CROSSTOOL to tell Bazel we need PDB file 4. Add PDB file artifact in an output named pdb_file of cc_binary, then you can build the pdb file by bazel build //foo/bar:bin --output_groups=pdb_file 5. Add test for PDB file generation Change-Id: Ia5096470187ebca72f2c804f32d5b723f40c0b85 PiperOrigin-RevId: 153449059
* Simplify LocalSpawnRunnerGravatar ulfjack2017-04-18
| | | | PiperOrigin-RevId: 153444516
* Split out option usage restriction from option category.Gravatar ccalvarin2017-04-18
| | | | | | | | | These are two different concepts. Do not remove category overload compatibility in this CL, to keep this change limited to converting the current uses of category. With some flyby formatting fixes on affected OptionsBases. RELNOTES: None. PiperOrigin-RevId: 153390002
* Add ordering semantics for cached options dataGravatar brandjon2017-04-18
| | | | | | | This lets us easily get all options classes of a parser, or all fields of those options classes, in a deterministic way. RELNOTES: None PiperOrigin-RevId: 153376699
* Remove the overloading of option category to cover documentation level.Gravatar ccalvarin2017-04-18
| | | | | | | | This prevents having to parse the category, and allows the category to potentially be used in the future for information about all options, included undocumented, hidden, or internal options. Also rename DocumentationLevel to OptionUsageRestrictions, since INTERNAL was not really documentation related. PiperOrigin-RevId: 153367769
* Add /sdk/extras/m2repository the list of Android SDK embedded Maven ↵Gravatar ajmichael2017-04-18
| | | | | | | | | repositories. Fixes https://github.com/bazelbuild/bazel/issues/2830 RELNOTES: None PiperOrigin-RevId: 153367521
* Automated g4 rollback of commit e1d692e486a2f838c3c894fd9de693fabd6685ed.Gravatar schmitt2017-04-18
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** broken tests *** Original change description *** Init absent action configs for CppCompile actions So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 153366563
* Basic open-source crosstool to support targetting apple platform types.Gravatar cparsons2017-04-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 153360877
* Expose Bazel's Android data binding support to users.Gravatar gregce2017-04-18
| | | | | | | | | | | | The logic is already in Bazel but wasn't available to build rules. This change makes it available, but still requires data binding's {build|run}time libraries to be checked into appropriate depot spots for everything to work. Followup changes will make those libraries easily available. Issue: #2694 PiperOrigin-RevId: 153359861
* Automated g4 rollback of commit e7c730ba64d1c34ac7049f4165a33dc1329d0019.Gravatar jfield2017-04-18
| | | | | | | | | | | | | | | *** Reason for rollback *** breaks tests *** Original change description *** Extract --sysroot flag from bazel and move it into crosstool This is an encore of https://github.com/bazelbuild/bazel/commit/6127358c1799d8d83cebbd499edac89f869df41b . RELNOTES: None. PiperOrigin-RevId: 153351147
* Refactor options tests into a new fileGravatar brandjon2017-04-18
| | | | | | | | | | | OptionsParserTest is kind of massive. This CL splits off tests that only concern IsolatedOptionsData. For example, tests that deal with malformed option specifications, but not string parsing, would go here. A followup CL will add tests of IsolatedOptionsData's accessor methods. Also added a unit test for the warning added by https://github.com/bazelbuild/bazel/commit/e11775c2394fc48ac7fe5b632b47ae952dd552b4. RELNOTES: None PiperOrigin-RevId: 153346363
* Automated g4 rollback of commit 045104899738594d85f9ab9b0b9ccbde320b8055.Gravatar jfield2017-04-18
| | | | | | | | | | | | | *** Reason for rollback *** Breaks internal tests that use nonstandard crosstools *** Original change description *** Make C++ archiving use action_configs instead of hardcoded flags RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153344597
* Fix an expansion flag issue where it expands to a repeatable flag.Gravatar ccalvarin2017-04-18
| | | | | | | | There's no reason an expansion flag should not expand to multiple values for a repeatable flag (a flag with allowMultiple set to true.) If this expansion flag is set in a SetValue policy, group its repeatable subflags into a single SetValue per subflag. For an overridable SetValue policy on an expansion, any repeatable flag that it expands to should append its value, and not override the user's original values. PiperOrigin-RevId: 153233784
* Expose the native libs of the android_binary rule to skylark.Gravatar Googler2017-04-18
| | | | | RELNOTES: none PiperOrigin-RevId: 153223511
* Teach the RClassGenerator to merge all library symbols and reconcile ids.Gravatar corysmith2017-04-18
| | | | | | | Refactoring: Wrapped the SymbolLoader and SymbolWriter in a single class. RELNOTES: None PiperOrigin-RevId: 153194543
* Migrate UnixGlob to Path#statIfFound() instead of #statNullable(). The ↵Gravatar felly2017-04-18
| | | | | | | | | latter swallows all filesystem failures, and does not disambiguate missing files from filesystem problems. The syscall cache now tracks IOExceptions if they are present, just as it does with readdir(). RELNOTES: None PiperOrigin-RevId: 153185433
* In android_library targets, R.class files should not be runtime dependenciesGravatar Googler2017-04-18
| | | | | | | | | | | | | | | | | | android_binary targets have their own R.java files (built from merging dependencies and any resources that belong directly to the target). As such, they don't need inherited R.java files at runtime. Taking these out makes for smaller APKs and less inheritance from the target's dependencies. Add a flag to control this behavior. Have it default to continue to include R.class files as runtime dependencies so we can control rollout of this behavior. Add tests of android_binary to ensure the JAR is filtered out as appropriate, and of android_robolectrictest to ensure that those tests still have access to the JARs. RELNOTES: none PiperOrigin-RevId: 153177074
* Fix `in` operator for targetsGravatar vladmos2017-04-18
| | | | | | `DefaultInfo in target` should always return `true` for any target. PiperOrigin-RevId: 153166669
* Move xcrunwrapper and libtool to third_party/bazel/tools/objc from their ↵Gravatar cparsons2017-04-14
| | | | | | | | | xcode src directories There's no value in having these copied over from src/tools to tools/objc separately. RELNOTES: None. PiperOrigin-RevId: 153060955
* Make C++ archiving use action_configs instead of hardcoded flagsGravatar hlopko2017-04-13
| | | | | RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153046587
* BEP: for local transports optionally drop path conversionGravatar Klaus Aehlig2017-04-13
| | | | | | | | | For transports that are purely local (like the ones writing to a local file), it sometimes can be useful to skip path conversion and use the local paths directly. Support this for the text and binary format file transports. Change-Id: I2ac2e187ebb11ff82c4e1ddf4881ea54f9d4205d PiperOrigin-RevId: 153044267
* Make src/test/shell/integration/logging_test.sh executable.Gravatar buchgr2017-04-13
| | | | | | ci.bazel.io fails because this shell script is not executable. PiperOrigin-RevId: 153042368
* Do not add a build id to C++ binaries by default.Gravatar lberki2017-04-13
| | | | | | | Fixes #2805. RELNOTES: None. PiperOrigin-RevId: 153039178
* Remove special cases for "name" in implicit outputs codeGravatar Benjamin Peterson2017-04-13
| | | | | | | | | | | | | fa97703c1edf ("allow skylark implicit output callbacks to use the rule name") fixed a limitation of the skylark implicit outputs by adding a special case for "name" to the implicit outputs code. Later, 015e5954157a ("Remove special handling of name attribute") fixed the general problem of "name" being a special case in the attribute map. Therefore, we can remove my original fix. We may also excise an older special case in the implicit outputs templating code. Change-Id: I606c9decd98a8df492d2359abe540d3263f99fe1 PiperOrigin-RevId: 152974774
* Add a custom single-line formatter for java.log.Gravatar schmitt2017-04-13
| | | | | | | | This logger makes it easier to parse log statements and is now enabled for Bazel's java.log. RELNOTES[INC]: Bazel now prints logs in single lines to java.log PiperOrigin-RevId: 152954337
* Add feature_flags attribute to Android binary rules.Gravatar mstaib2017-04-13
| | | | | | | | | | | This is the first actual user of the config_feature_flag rule, able to actually set its value (and thus give a point to using it!) This feature is not fully launched yet, but it is usable in any build containing this change. RELNOTES: None. PiperOrigin-RevId: 152948153