aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
...
* Add a normal startup-option for setting the digest function.Gravatar ccalvarin2018-08-01
| | | | | | | | | We continue to support the jvm property -Dbazel.DigestFunction, for backwards compatibility, but this will go away. The startup-option is marked experimental for now as we iron out issues. (note: leaving this out of release notes until the experimental tag is removed) As part of this refactor, the default constructor calls for FileSystem and derived classes will now use this default. This should remove the need for constructors that accept custom hash functions. RELNOTES: None. PiperOrigin-RevId: 207035217
* Fix tests to work when the default value of the flag ↵Gravatar dbabkin2018-08-01
| | | | | | | | | --experimental_enable_tools_defaults_package flipped to false RELNOTES:none PiperOrigin-RevId: 206982558
* Pass a path to ActionExecutedEvent that is resolved via ActionExecutionContext.Gravatar tomlu2018-08-01
| | | | | | | If the output artifact is backed by a different file system then we need to use that file system later. RELNOTES: None PiperOrigin-RevId: 206981369
* Refactor setupPackageCache to get all BuildConfiguration.Options references ↵Gravatar juliexxia2018-08-01
| | | | | | | | out of it. Setting up the package cache is necessary for proper loading. In the future, BuildConfiguration.Option options will be targets that need to be loaded in order to be parsed. Thus, we will need to be able to do loading before BuildConfiguration.Options are parsed. PiperOrigin-RevId: 206964473
* Automated rollback of commit 15b27e46ad766e777fb898f39bff06efa9268c2a.Gravatar Googler2018-08-01
| | | | | | | | | Keep the usage of Streams in place. Keep the test in place, updated it with the new expected values. Only removed the neverlink filter. RELNOTES: none. PiperOrigin-RevId: 206951071
* Automated rollback of commit 38899f708923d6a7e1edd011af2ba70f505bb4c9.Gravatar twerth2018-08-01
| | | | | | | | | | | | | | | *** Reason for rollback *** Necessary for [] *** Original change description *** Return Java providers only once through JavaInfo, instead of returning them also through ConfiguredTarget. Since these providers can not be found in ConfiguredTarget anymore they have to be retrieved from JavaInfo instead. RELNOTES: None. PiperOrigin-RevId: 206915058
* Remove output jar from runfiles and the ijar from the OutputJar when sourcesGravatar Googler2018-07-31
| | | | | | | are not provided. RELNOTES: none. PiperOrigin-RevId: 206768891
* Removes serialization class that introduced bug.Gravatar plf2018-07-31
| | | | | RELNOTES:none PiperOrigin-RevId: 206767138
* Add the source jars of exports to the list of transitive source jars.Gravatar Googler2018-07-31
| | | | | RELNOTES: none. PiperOrigin-RevId: 206760974
* Clearing //tools/defaults:*Gravatar dbabkin2018-07-31
| | | | | | | | Replaced reference to //tools/defaults:crosstool by //tools/cpp:crosstool. Added Target //tools/cpp:crosstool to base test environment setup. RELNOTES:none PiperOrigin-RevId: 206747334
* Add aarch64 embedded JDK config, MacOS mock toolchain settingsGravatar Arielle Albon2018-07-31
| | | | | | | | | | | | | | | Hi, This PR is for additional work to get the tests running correctly on Aarch64. One key issue was that the default embedded jvm used by default was X86_64 and does not work on other architectures. To support this I have added a new constraint, however I will refine this in case a version of Darwin becomes available on aarch64. I'll do the work to find a good arm32 toolchain in a future CL. I do not have access for ppc or z390 to repair those architectures. Either way, hope this is good for you. Closes #5525. PiperOrigin-RevId: 206717726
* Do not collect source jars for neverlink targets.Gravatar Googler2018-07-31
| | | | | RELNOTES: none. PiperOrigin-RevId: 206717454
* Make explicit the contract of ConfiguredTarget builders returning null when ↵Gravatar cparsons2018-07-30
| | | | | | | there are rule errors. RELNOTES: None. PiperOrigin-RevId: 206652580
* Internal changeGravatar ruperts2018-07-30
| | | | PiperOrigin-RevId: 206642715
* Automated rollback of commit be88b8539b30d1c36c68b0f6acfe1e9ae010db3b.Gravatar cparsons2018-07-30
| | | | | | | | | | | | | *** Reason for rollback *** Concerns were raised about this breaking change, so rolling back to be safe. *** Original change description *** Throw a rule error when a skylark rule implementation returns multiple providers of the same type. RELNOTES: A rule error is now thrown if a Skylark rule implementation function returns multiple providers of the same type. PiperOrigin-RevId: 206629186
* Improve artifact->owner label accounting in two ways. First, don't do the ↵Gravatar janakr2018-07-30
| | | | | | full mapping unless requested. This gets rid of any performance issue for the vast majority of builds. Second, if requested, use a custom data structure so that we don't have to create a full HashSet for artifacts whose only owning labels are their own owner labels. PiperOrigin-RevId: 206610370
* Return Java providers only onceGravatar elenairina2018-07-30
| | | | | | | through JavaInfo, instead of returning them also through ConfiguredTarget. Since these providers can not be found in ConfiguredTarget anymore they have to be retrieved from JavaInfo instead. RELNOTES: None. PiperOrigin-RevId: 206585413
* Add manifestProtoOutput produced during Java compilation to the OutputJar so ↵Gravatar Googler2018-07-30
| | | | | | | that it can be accessed in Skylark. One example where this is used is in Android IDL processing where the manifestProtoOutput is used to split out the Android IDL generated Java classes from the overarching outputJar produced by the android_library rule. RELNOTES: none PiperOrigin-RevId: 206580880
* Make the fallback strategy for Bazel's remote execution configurable.Gravatar philwo2018-07-30
| | | | | | | | | RELNOTES: When using Bazel's remote execution feature and Bazel has to fallback to local execution for an action, Bazel used non-sandboxed local execution until now. From this release on, you can use the new flag --remote_local_fallback_strategy=<strategy> to tell Bazel which strategy to use in that case. PiperOrigin-RevId: 206566380
* Automatic code cleanup.Gravatar Googler2018-07-30
| | | | PiperOrigin-RevId: 206564363
* Make sure the --host_platform_remote_properties_override flags isGravatar John Cater2018-07-27
| | | | | | | | | | | | | honored when creating the host platform. Fixes #5695. Change-Id: Iaa99c8189421893440e5e5140450c70de69d7b86 Closes #5696. Change-Id: Iaa99c8189421893440e5e5140450c70de69d7b86 PiperOrigin-RevId: 206371468
* Throw a rule error when a skylark rule implementation returns multiple ↵Gravatar cparsons2018-07-27
| | | | | | | providers of the same type. RELNOTES: A rule error is now thrown if a Skylark rule implementation function returns multiple providers of the same type. PiperOrigin-RevId: 206371385
* Automated rollback of commit 7e87730de985b7099b9b683571d58efdaab70890.Gravatar ccalvarin2018-07-27
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Go back to the default constructor - instead of requiring everywhere to know the correct hash function, we'll have the default rely on global state. It will make transition easier, even if it makes the origin of the hash less obvious. *** Original change description *** Remove default MD5 in most of Bazel's virtual filesystems. This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206358838
* Automated rollback of commit db01c6f926bcb4774d901797c59f51dd54c05624.Gravatar janakr2018-07-27
| | | | | | | | | | *** Reason for rollback *** Rolling forward with fixes. *** Original change description *** PiperOrigin-RevId: 206339696
* Add an option to compress the JSON trace profile.Gravatar twerth2018-07-27
| | | | | | | chrome://tracing is able to load gzipped profiles out of the box. RELNOTES: None PiperOrigin-RevId: 206308018
* Add a flag to split test.xml generation into a separate SpawnGravatar ulfjack2018-07-27
| | | | | | | | | | At this time, this is only implemented for the StandaloneTestStrategy. This solves a race condition on Posix-like systems, where we cannot guarantee that the pipes are actually fully flushed to disk when the test process exits, and this can cause the test.xml to be empty, which makes it hard to debug issues. (The test.log files do not show up in normal CI systems, only the test.xml files.) Progress on #4608. PiperOrigin-RevId: 206292179
* C++: Fixes the way errors are checked in tests.Gravatar plf2018-07-27
| | | | | RELNOTES:none PiperOrigin-RevId: 206287557
* Remove default MD5 in most of Bazel's virtual filesystems.Gravatar ccalvarin2018-07-26
| | | | | | | | | This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code. To keep this CL smaller, do not remove the default from UnixFS quite yet. RELNOTES: None. PiperOrigin-RevId: 206223521
* Modify --subcommands to allow pretty printing the arguments of a subcommandGravatar ahumesky2018-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a list, rather than as a single line (i.e., newline delimited rather than space delimited). Before: SUBCOMMAND: # //src/main/java/com/google/devtools/build/lib:string_util [action 'Building src/main/java/com/google/devtools/build/lib/libstring_util.jar (2 source files) [for host]'] (cd /tmp/devbazel_output_base/execroot/io_bazel && \ exec env - \ LC_CTYPE=en_US.UTF-8 \ external/embedded_jdk/bin/java -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--patch-module=java.compiler=external/bazel_tools/third_party/java/jdk/langtools/java_compiler.jar' '--patch-module=jdk.compiler=external/bazel_tools/third_party/java/jdk/langtools/jdk_compiler.jar' '--add-opens=java.base/java.nio=ALL-UNNAMED' -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/libstring_util.jar-2.params) After: SUBCOMMAND: # //src/main/java/com/google/devtools/build/lib:string_util [action 'Building src/main/java/com/google/devtools/build/lib/libstring_util.jar (2 source files) [for host]'] (cd /tmp/devbazel_output_base/execroot/io_bazel && \ exec env - \ LC_CTYPE=en_US.UTF-8 \ external/embedded_jdk/bin/java \ -XX:+UseParallelOldGC \ -XX:-CompactStrings \ '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' \ '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' \ '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' \ '--patch-module=java.compiler=external/bazel_tools/third_party/java/jdk/langtools/java_compiler.jar' \ '--patch-module=jdk.compiler=external/bazel_tools/third_party/java/jdk/langtools/jdk_compiler.jar' \ '--add-opens=java.base/java.nio=ALL-UNNAMED' \ -jar \ external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar \ @bazel-out/host/bin/src/main/java/com/google/devtools/build/lib/libstring_util.jar-2.params) RELNOTES: --subcommands can now take a "pretty_print" value ("--subcommands=pretty_print") to print the arguments of subcommands as a list for easier reading. PiperOrigin-RevId: 206213009
* Make timestamps of InternalOrderedBuildEvent immutable.Gravatar Googler2018-07-26
| | | | | | Similar to the sequence number, the timestamp should be immutable and computed when the event is enqueued (not at serialization time). PiperOrigin-RevId: 206186036
* PiperOrigin-RevId: 206181674Gravatar shahan2018-07-26
|
* Target pattern eval: use the same number of threads as loadingGravatar ulfjack2018-07-26
| | | | | | | | Instead of using the default thread pool size of 200, use the number set for the loading phase. This is in preparation for interleaving the loading and target pattern eval phases. PiperOrigin-RevId: 206172915
* Use the path resolver when dealing with tree artifacts.Gravatar felly2018-07-26
| | | | | RELNOTES: None PiperOrigin-RevId: 206157591
* Add a flag to make Apple rules not share C++ compile actions.Gravatar lberki2018-07-26
| | | | | | | | | | | | | | | | | | | This is accomplished by: - Setting the APPLE_CROSSTOOL configuration distinguisher in AppleCrosstoolTransition - Doing nothing in AppleCrosstoolTransition in case we are already in an Apple configuration so that funky use cases like a binary having a dependency on a swift_library both directly and through an objc_library work - Adding the "apl-" prefix to the output directory name in APPLE_CROSSTOOL configurations Plus a few minor cleanups: - Removed some unused methods - Nopped out --enable_apple_crosstool_transition if the new flag is set - Nopped out --target_uses_apple_crosstool if the new flag is set These latter reduce the possible space of Apple configurations, thus making the code a bit more comprehensible. RELNOTES: None. PiperOrigin-RevId: 206157413
* C++: Removes calls to setCcLinkparamsStore of CcLinkingInfo.BuilderGravatar plf2018-07-26
| | | | | | | | | | This is in preparation for deleting CcLinkParamsStore. Not all calls to setCcLinkparamsStore have been removed in this CL. Roll forward with bzl change in separate CL (unknown commit) and giving a proper error in Skylark instead of a crash when CcLinkingInfo is not built correctly. RELNOTES:none PiperOrigin-RevId: 206122870
* Automated rollback of commit ce8f52060e2cf1e5a49a522039f0cba2a340f7e3.Gravatar cushon2018-07-25
| | | | PiperOrigin-RevId: 206102499
* [Skylark] Support dictionaries in structs when serializing them using ↵Gravatar Taras Tsugrii2018-07-25
| | | | | | | | | | | | | | | | | struct.to_json. Dictionaries are frequently used for generic configuration descriptions especially given that `struct` is not allowed in build files. In order to be JSON-compatible, only dictionaries with string keys are allowed. Technically Python also allows integers and booleans by automatically converting them to strings, but this is confusing and not necessarily a good thing to do. Fixes #5542 Closes #5543. PiperOrigin-RevId: 206049754
* Support optional repository verificationGravatar Klaus Aehlig2018-07-25
| | | | | | | | | | | | | | | | Add an option to provide a file with a resolved value, that will be used to verify that the repositories mentioned in this file produce a correct directory tree. RELNOTES: newly added options --experimental_repository_hash_file and --experimental_verify_repository_rules allow to verify for repositories the directory generated against pre-recorded hashes. See documentation for those options. Work towards #5660. Change-Id: I2d8becb188d0fa51e890fb8f6139f321cca14b7b PiperOrigin-RevId: 206016792
* Use the single-string arg formatter for param file format.Gravatar tomlu2018-07-25
| | | | | | | This avoids bazel crashes for illegally formatted strings. Previously the code would assume that a correct string was passed with only minimal validation. RELNOTES: None PiperOrigin-RevId: 206012819
* Remove LoadingResultGravatar ulfjack2018-07-25
| | | | | | | | | | | Instead, refactor the code to use TargetPatternPhaseValue exclusively. This removes the need to convert from TargetPatternPhaseValue to LoadingResult, and prepares for interleaving. It also reduces the number of Skyframe calls which may speed up null builds a bit, as a followup for https://github.com/bazelbuild/bazel/commit/1067310e18cb9ac203110726de0be53bdc403cea. PiperOrigin-RevId: 205989338
* Remove AbstractQueueVisitor.runConcurrently and .activeParallelTasks whichGravatar Googler2018-07-25
| | | | | | | aren't used anymore. RELNOTES: None. PiperOrigin-RevId: 205984908
* remote: fix race on download error. Fixes #5047Gravatar buchgr2018-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For downloading output files / directories we trigger all downloads concurrently and asynchronously in the background and after that wait for all downloads to finish. However, if a download failed we did not wait for the remaining downloads to finish but immediately started deleting partial downloads and continued with local execution of the action. That leads to two interesting bugs: * The cleanup procedure races with the downloads that are still in progress. As it tries to delete files and directories, new files and directories are created and that will often lead to "Directory not empty" errors as seen in #5047. * The clean up procedure does not detect the race, succeeds and subsequent local execution fails because not all files have been deleted. The solution is to always wait for all downloads to complete before entering the cleanup routine. Ideally we would also cancel all outstanding downloads, however, that's not as straightfoward as it seems. That is, the j.u.c.Future API does not provide a way to cancel a computation and also wait for that computation actually having determinated. So we'd need to introduce a separate mechanism to cancel downloads. RELNOTES: None PiperOrigin-RevId: 205980446
* Increase sharding for SkylarkTestsGravatar laurentlb2018-07-25
| | | | | | | | This makes the tests run much faster. Fixes #5443 RELNOTES: None. PiperOrigin-RevId: 205980410
* Configured targets register created source artifacts with Skyframe.Gravatar shahan2018-07-24
| | | | PiperOrigin-RevId: 205876673
* Automated rollback of commit f309ad3be36363070e87eef0ee04b12f4956d601.Gravatar janakr2018-07-24
| | | | | | | | | | *** Reason for rollback *** Fixed duplicate derived inputs bug. Test is in diffbase. RELNOTES[INC]: If the same artifact is generated by two distinct but identical actions, and a downstream action has both those actions' outputs in its inputs, the artifact will now appear twice in the downstream action's inputs. If this causes problems in Skylark actions, you can use the uniquify=True argument in Args.add_args. PiperOrigin-RevId: 205863806
* Create the native headers jar in java_common.compile.Gravatar Irina Iancu2018-07-24
| | | | | | | | RELNOTES: java_common.compile creates the native headers jar accesible via JavaInfo.outputs.native_headers. Closes #5662. PiperOrigin-RevId: 205832180
* Move LoadingPhaseCompleteEvent posting to TargetPatternPhaseFunctionGravatar ulfjack2018-07-24
| | | | | | | | | | | Also simplify LoadingPhaseCompleteEvent, and SkyframeExecutor, and remove LoadingCallback, which is unnecessary now that we only have a single implementation (previously LoadingPhaseRunner). This also removes some of the excessive Skyframe calls introduced by https://github.com/bazelbuild/bazel/commit/1067310e18cb9ac203110726de0be53bdc403cea, and prepares for interleaving target pattern eval and loading. PiperOrigin-RevId: 205813197
* Remove redundancy in DigestHashFunction use in FileSystem.Gravatar ccalvarin2018-07-23
| | | | | | | Each FileSystem instance has a digest function, but the getDigest and getHashDigest functions also accepted their own custom parameter functions. We only support 1 hash per filesystem instance, these parameters are redundant. RELNOTES: None. PiperOrigin-RevId: 205758571
* Add --experimental_enable_cc_toolchain_label_from_crosstool_proto flag for ↵Gravatar rosica2018-07-23
| | | | | | | | | disabling relying on CROSSTOOL file in order to select the cc_toolchain label CROSSTOOL file should not have any influence over selection of the cc_toolchain label. Ultimately the information that CROSSTOOL offers will be rerouted through an attribute of cc_toolchain. RELNOTES: None. PiperOrigin-RevId: 205651369
* Introduce option flag experimental_enable_tools_defaults_package.Gravatar dbabkin2018-07-23
| | | | | | | | Default value is true, and behavior related to //tools/defaults package is not changed. If set it to false, then in-memory Dfaultpacked will not be created. RELNOTES:none PiperOrigin-RevId: 205643628