aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Remove scope escaping capability from InMemoryFileSystem.Gravatar tomlu2017-10-23
| | | | | | | | Nobody sets a delegate anymore, meaning it should be fine to crash hard if we try to resolve a file outside scope. The CL was created by inlining ScopeEscapableFileSystem into InMemoryFileSystem, making it impossible to return an outOfScope file status (instead throwing an exception), then trivially fixing the code. PiperOrigin-RevId: 172886769
* Properly attaching context for remote uploads in RemoteSpawnCache.Gravatar olaola2017-10-20
| | | | | | | | Fixes #3930. Also added tests. TESTED=added tests RELNOTES: Fixing regression to --experimental_remote_spawn_cache PiperOrigin-RevId: 172852740
* Add Path argument to supportsModifications, supports*LinksNatively.Gravatar tomlu2017-10-20
| | | | | | | | This works better with UnionFileSystem, as (eg.) different mapped file systems might not agree on whether they are read-only. No actual code changes have been made that actually uses this argument, so this should be a behaviour no-op. PiperOrigin-RevId: 172782759
* Add ObjectCodecTester, migrating a few tests to use itGravatar michajlo2017-10-20
| | | | | | | | | | | This provides a composition-based alternative to the existing inheritance-based testing style. The inheritance style has been showing its age/has become quite cumbersome when multiple codecs are in the same class or codecs are colocated with their encoded class. This will hopefully get rid of some friction when adding new codecs. RELNOTES: None PiperOrigin-RevId: 172778555
* Remove OS/Xcode versions (and thus package loading) from ↵Gravatar lberki2017-10-20
| | | | | | | | | | | AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 172714477
* [Bazel] Change default place where {java,cc}_proto_library look for their ↵Gravatar carmi2017-10-20
| | | | | | | | | external repo dependencies. This fixes https://github.com/cgrushko/proto_library/issues/4. RELNOTES: [Bazel] {java,cc}_proto_library now look for dependencies in @com_google_protobuf, instead of in @com_google_protobuf_$LANG PiperOrigin-RevId: 172685722
* Add memory profiler.Gravatar tomlu2017-10-18
| | | | | | | | | | | This adds two dump command, bazel dump --rules and bazel dump --skylark_memory. dump --rules outputs a summary of the count, action count, and memory consumption of each rule and aspect class. dump --skylark_memory outputs a pprof-compatible file with all Skylark analysis allocations. Users can then use pprof as per normal to analyse their builds. RELNOTES: Add memory profiler. PiperOrigin-RevId: 172558600
* Actions now have the option of returning an ActionResult, containing a ↵Gravatar ruperts2017-10-18
| | | | | | | (possibly empty) set of SpawnResults created during execution of the Action. RELNOTES: None. PiperOrigin-RevId: 172529328
* Remove feature to allow expansion flags to have values.Gravatar ccalvarin2017-10-18
| | | | | | | | | It was added as a potential fix for --config (an expansion flag with values), but this would have required forcing the parser to know the config's expansions at parsing time, which is not currently possible. Instead, we will use the new addition of option-location tracking to make sure we expand options at a the correct place, even if the expansion is triggered after the fact. This is mostly a straight forward undoing of https://github.com/bazelbuild/bazel/commit/7c7255ec8d6da20526c2c4078c57aadaf3dd3612, except where the context has changed. Notably, implicit requirements are effectively treated like expansion flags, so special casing in OptionDescription could be removed. RELNOTES: None. PiperOrigin-RevId: 172514997
* Fall back on basic StringCodec if FastStringCodec isn't availableGravatar michajlo2017-10-18
| | | | | | | Also adds a method which can be used to tell if this behavior actually applied, for more performance-sensitive users. PiperOrigin-RevId: 172512011
* Make cc_toolchain put the files comprising the toolchain into its FileProvider.Gravatar lberki2017-10-18
| | | | | | | Note that cc_toolchain_suite is not changed this way, but that rule doesn't currently serve as a proxy for cc_toolchain (unlike java_runtime_suite for java_runtime), so that's OK. RELNOTES: None. PiperOrigin-RevId: 172502279
* Fixing #3834, making sure test.log always exists.Gravatar olaola2017-10-18
| | | | | | | | Even if the test action produced no output, which it really shouldn't, Bazel should create an empty test.log file. TESTED=unit tests RELNOTES: Fixes #3834 PiperOrigin-RevId: 172412615
* Removing local fallback on failed action commands.Gravatar olaola2017-10-18
| | | | | | | | We should only fall back if a remote execution error occurred, not if the command itself failed. TESTED=better unit tests RELNOTES: None PiperOrigin-RevId: 172406687
* Relax SplitTransitionProvider interface to use AttributeMapGravatar cparsons2017-10-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 172394552
* Extend from an abstract base class to avoid duplication of utility methods ↵Gravatar ruperts2017-10-18
| | | | | | | in RuleErrorConsumers RELNOTES: None. PiperOrigin-RevId: 172387755
* Track Option placement within a priority category.Gravatar ccalvarin2017-10-18
| | | | | | | | | An option has precedence over previous options at the same enum-valued priority. Track its placement in this ordering explicitly. This will allow after-the-fact expansion of expansion options such that they correctly take precedence or not compared to other mentions of the same flag. This is needed to fix --config's expansion. RELNOTES: None. PiperOrigin-RevId: 172367996
* Optimize trusted MutableList constructionGravatar michajlo2017-10-18
| | | | | | | | | | | | Cuts back a lot of unnecessary copying. All construction is funneled through copyOf and wrapUnsafe. copyOf is the traditional construction mechanism, taking defensive copies of the input and determining if GlobList information needs to be retained. wrapUnsafe takes full ownership of the supplied ArrayList, allowing us to skip a lot of copies in trusted situations. This is particularly useful for common built in functions which return a list, range() being one common example. RELNOTES: None PiperOrigin-RevId: 172361367
* Delayed rollforward of commit 8fb311b4dced234b2f799c16c7d08148619f4087.Gravatar kush2017-10-18
| | | | | | | | | | | | | | | This was rolled back due to Tensorflow breakage but the patch I exported to gerrit (https://bazel-review.googlesource.com/c/bazel/+/18590) passed Tensorflow (https://ci.bazel.io/job/bazel/job/presubmit/52/Downstream_projects/). Confirmed with jcater@ that the "newly failing" projects in the Global Tests are known issues. I think we can check this in now. Additionally I had attempted to reproduce any tensorflow issues with this by building and testing TensorFlow locally with this patch, and all tests which passed with the released bazel had also passed with this patch. ================= 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. RELNOTES: None. PiperOrigin-RevId: 172361085
* Fall back to guessing available memory on Linux machines running kernels ↵Gravatar Googler2017-10-18
| | | | | | | older than 3.14-rc1 (2014-02-02). RELNOTES: N/A PiperOrigin-RevId: 172356826
* Accept command lines from tools invoking Bazel.Gravatar ccalvarin2017-10-18
| | | | | | | | | | | For tools that wrap Bazel in some way, the original way that the tool was invoked can be a useful piece of information to track when logging what Bazel did and why. In order to output this information in the same way that Bazel outputs its command lines, we accept --tool_command_line in the structure command line format that Bazel uses in the BEP. These structured command lines are protos that we expect as a base64 encoded byte array. For simple scripts that wish to use this feature without compiling the proto, we will also accept any old string (that cannot be interpreted as a base64 encoding) as a single "chunk" in a structured command line. This is experimental for now and users should not get attached to the format. We will remove the experimental_ prefix when it is stable. RELNOTES: None. PiperOrigin-RevId: 172341216
* Actions now have a temp envvar.Gravatar László Csomor2017-10-16
| | | | | | | | | | | | | | | | | | | | | Every build and test action that creates a Spawn will now have platform-specific environment variables for temp directories: - on Windows: TMP and TEMP - on Linux/Darwin: TMPDIR This is particularly important on Windows where e.g. Java programs cannot create temp directories unless there's a valid TMP or TEMP environment variable set. Fixes: - https://github.com/bazelbuild/bazel/issues/1590 - https://github.com/bazelbuild/bazel/issues/2349 - https://github.com/bazelbuild/bazel/issues/2870 Change-Id: Ib758307daf6b3a51b0f71ae5e65e5bb564dad643 PiperOrigin-RevId: 172326371
* Move min/max tests to new test suiteGravatar laurentlb2017-10-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 172325367
* BuildEventStreamer: clear a pending BuildStarted event firstGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | | | | | | | | | | | If we receive an event indicating that the build is over, we first post that event and then clear up all pending event by stating that their prerequisite event was aborted (which we can safely assert, as we know we will not process any further events). Now, if a build is aborted (e.g., user interruption) before the build starting event is generated, the streamer can receive a build-finished event while still having an event (e.g., the raw command line) blocked on the build-starting event. So the canonical order of clearing the stream would send a build-finished event before the build-starting event, which can be confusing to consumers of the stream. Therefore, if have to generate an artificial aborted build-starting event, do so first (including clearing the events blocked on the build-starting event) and only afterwards post the build-finished event in the stream. Change-Id: Ib33f16f74b7bee7a963df94bbcad7a56db9f07e3 PiperOrigin-RevId: 172305114
* Export apple_host_system_env and target_apple_env through apple_common (as ↵Gravatar lberki2017-10-16
| | | | | | | | | opposed to only through ctx.fragments.apple) Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172299240
* Extract more RuleContext error-related methods into RuleErrorConsumerGravatar cparsons2017-10-16
| | | | | | | This will make it easier to pass only error-handling functionality into support classes. RELNOTES: None. PiperOrigin-RevId: 172148072
* Properly report errors as errors.Gravatar nharmata2017-10-16
| | | | | RELNOTES: None PiperOrigin-RevId: 172133468
* Add callcount system for blaze developers.Gravatar tomlu2017-10-16
| | | | | | | | | | | This simple system allows blaze developers to insert instrumentations in particular methods that they want to know: 1. How often are they called? 2. From which call sites are they called, with full call stack The output is a pprof file that can then be analysed offline. PiperOrigin-RevId: 172128440
* Update documentation on objc_proto_library rule, and disable the passing of ↵Gravatar kaipi2017-10-16
| | | | | | direct files into the deps attribute, only proto_library and objc_proto_library targets are allowed. PiperOrigin-RevId: 172107133
* Apply suggested fixes that were missed in ↵Gravatar jcater2017-10-16
| | | | | | http://https://github.com/bazelbuild/bazel/commit/5b4b7a3ebb83a8c93d8f68ade7bf1242c8590256 PiperOrigin-RevId: 172099288
* Improve private skylark attribute error messagingGravatar cparsons2017-10-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 172087232
* Put the platform version from the options into the output directory name ↵Gravatar lberki2017-10-13
| | | | | | | instead of the one computed based on xcode_config. RELNOTES: None. PiperOrigin-RevId: 172064337
* Disable some tests that can't currently run in special internal execution mode.Gravatar janakr2017-10-13
| | | | PiperOrigin-RevId: 172007131
* Remove the deprecated set constructor from SkylarkGravatar vladmos2017-10-13
| | | | | | | | | | The `set` constructor used to be deprecated, but it was still possible to use it by providing --incompatible_disallow_set_constructor=false. RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer available, the deprecated `set` constructor is not available anymore. PiperOrigin-RevId: 171962361
* Remove some no-op flags.Gravatar ajmichael2017-10-13
| | | | | | | The transition period is over, these features have now been rolled out. RELNOTES: --experimental_use_parallel_android_resource_processing and --experimental_android_use_nocompress_extensions_on_apk are removed. These features are fully rolled out. PiperOrigin-RevId: 171957383
* Fix local repository detection when the repository path is absolute.Gravatar John Cater2017-10-13
| | | | | | | Fixes #3874. Change-Id: Ibbe3ea27b77426f551e2f70f082478edb2234749 PiperOrigin-RevId: 171957230
* Remove deprecated legacy string representations of Skylark objectsGravatar vladmos2017-10-13
| | | | | | | | RELNOTES[INC]: The flag --incompatible_descriptive_string_representations is no longer available, old style string representations of objects are not supported anymore. PiperOrigin-RevId: 171952621
* Throw a checked exception if there's an error reading /proc/meminfo, and ↵Gravatar janakr2017-10-12
| | | | | | handle it properly. PiperOrigin-RevId: 171906091
* Add follow-symlinks parameter to FileSystemUtils#copyTreesBelow, so that all ↵Gravatar janakr2017-10-12
| | | | | | the tool setup we do in tests doesn't necessarily have to be copied if we copy a workspace over. PiperOrigin-RevId: 171864170
* Replace all tool getters in CppConfiguration with corresponding calls toGravatar cpeyser2017-10-12
| | | | | | CcToolchainProvider#getToolPathFragment. PiperOrigin-RevId: 171837541
* Migrate usage of CppConfiguration#getToolPathFragment andGravatar cpeyser2017-10-11
| | | | | | CppConfiguration#getLdExecutable to CcToolchainProvider. PiperOrigin-RevId: 171818406
* Properly escape GitHub repository download URL for git_repository w/ sha256Gravatar Akira Baruah2017-10-11
| | | | | | | | Addresses #3661 Closes #3770. PiperOrigin-RevId: 171797773
* SplitTransitionProvider no longer requires the attributes it uses are "Non ↵Gravatar cparsons2017-10-11
| | | | | | | Configurable" RELNOTES: None. PiperOrigin-RevId: 171751391
* Refactor ConfiguredAttributeMapper to lib/packages from lib/analysis.Gravatar cparsons2017-10-11
| | | | | | | | | This requires moving the convenience constructor using RuleConfiguredTarget to be owned by RuleConfiguredTarget. This refactoring is required by later work to allow SplitTransitionProvider to use configurable attributes. This would require packages/Attribute.java -> analysis/ConfiguredAttributeMapper.java, where in general, the 'analysis' package depends on the 'packages' package. This is the easiest way to prevent a circular dependency. RELNOTES: None. PiperOrigin-RevId: 171741620
* Small refactoring of AnalysisTestCase to allow alternate SkyframeExecutor ↵Gravatar janakr2017-10-11
| | | | | | implementations. PiperOrigin-RevId: 171730718
* Non-c++ dependencies on CppConfiguration#getTargetCpu are made instead to useGravatar cpeyser2017-10-11
| | | | | | | BuildConfiguration#getTargetCpu. CppConfiguration#getTargetCpu is going to be removed to support platform-based toolchain selection. C++ dependencies will eventually use CppToolchainProvider#getTargetCpu. PiperOrigin-RevId: 171697663
* Return JavaInfo providers only once in Java rules.Gravatar elenairina2017-10-11
| | | | | | | Previously the java rules returned some providers twice: once as regular providers and once wrapped in JavaInfo (e.g. JavaCompilationArgsProvider). This is unnecessary, inefficient and error prone. JavaInfo should be the only way of returning these providers. RELNOTES: None. PiperOrigin-RevId: 171663550
* Remove sdk_version_for_platform from ctx.fragments.apple .Gravatar lberki2017-10-11
| | | | | | | | Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.sdk_version_for_platform is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig].sdk_version_for_platform . PiperOrigin-RevId: 171652446
* Move the MakeVariableExpander to a new packageGravatar ulfjack2017-10-10
| | | | | | | Rename it to TemplateExpander and start rewriting the documentation to refer to template variables. PiperOrigin-RevId: 171648255
* Remove ctx.fragments.apple.minimum_os_for_platform_type.Gravatar lberki2017-10-10
| | | | | | | | Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.minimum_os_for_platform_type is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig].minimum_os_for_platform_type . PiperOrigin-RevId: 171648040
* if --experimental_apple_mandatory_minimum_version is specified, make Apple ↵Gravatar lberki2017-10-10
| | | | | | | | | | | rules only add the minimum version of the OS to the output directory name if the configuration is behind an AppleBinaryTransition, or if a minimum_os flag (such as --ios_minimum_os) is specified on the command line. This is necessary so that the only time the minimum OS version affects the output directory name is when it's explicitly specified and therefore is accessible without looking at the xcode_config rule. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 171641295