aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Remove legacy implementation of objc compilation/archiving/linking.Gravatar cpeyser2017-11-06
| | | | PiperOrigin-RevId: 174481563
* Filter local and transitive resources togetherGravatar Googler2017-11-06
| | | | | | | | | | | | | | | | | | Whether a resource is accepted or rejected by density-based resource filtering is dependent on what other resources are available. When filtering resources in execution, this was taken into account - resources were filtered after merging. To replicate this behavior when filtering in analysis, we must look at both local and transitive resources before we actually filter anything. This process makes filtering with dynamic configuration extremely inefficient, since the NestedSet of transitive resources must be collapsed at each library target. We can fix this by only looking at the transitive resources at the top-level target, even when using dynamic filtering. I'm not implementing that in this change, however, since dynamic filtering is relatively low priority and this review is already pretty big. Note that some of the messiness around filtering ResourceDependencies and NestedSet<ResourceContainer> will go away once those NestedSets are removed. Also, stop filtering resources in android_test, since android_test can never specify resource filters. RELNOTES: none PiperOrigin-RevId: 174474491
* Add rootpath(s) and execpath(s) functions to template expansionGravatar ulfjack2017-11-03
| | | | | | | | | | | | | | | | In addition to the $(location) function, we now also support $(rootpath) and $(execpath) functions. Unfortunately, we have to do this in two places since the Skylark API for expand_location has to continue calling into LocationExpander in order to preserve its semantic contract. Progress on #2475. RELNOTES[NEW]: In addition to $(location), Bazel now also supports $(rootpath) to obtain the root-relative path (i.e., for runfiles locations), and $(execpath) to obtain the exec path (i.e., for build-time locations) PiperOrigin-RevId: 174454119
* Open-source the remainder of non-legacy Apple/Objc java testsGravatar cparsons2017-11-03
| | | | | RELNOTES: None. PiperOrigin-RevId: 174397203
* Avoid crash when a test and its alias are specified on the command line for ↵Gravatar lberki2017-11-03
| | | | | | | "blaze test". RELNOTES: None. PiperOrigin-RevId: 174386473
* Automated rollback of commit 8cb1d2fb460a9caf47df58d7ff051d31080a77cb.Gravatar ulfjack2017-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward again without the changes to expand_location, but with the trimming fix from https://github.com/bazelbuild/bazel/commit/19617360121635a77ffec99b84d825e7d9b260b1. *** Original change description *** Automated rollback of commit ca77f608e486bf7aa762565d25bf7b9e30f2268c. This also rolls back unknown commit. *** Reason for rollback *** Affected expand_location Skylark API semantics - it no longer accepts ${abc} or plain dollar signs, but complains. *** Original change description *** Extend TemplateExpander to handle $(func param) expansion Rewrite the Expander to use the new functionality; also rewrite the Skylark expand_location function to use it. PiperOrigin-RevId: 174384095
* Remove unused LegacyParamsFilePreProcessor. Removed test cases from ↵Gravatar apell2017-11-03
| | | | | | | OptionsParserTest are implemented in ParamsFilePreProcessorTest, ShellQuotedParamsFilePreProcessorTest and UnquotedParamsFilePreProcessorTest. RELNOTES: None. PiperOrigin-RevId: 174359569
* Switch on tracking of specific option priorities.Gravatar ccalvarin2017-11-03
| | | | | | | Make sure that multiple calls to parse() follow each other sequentially. This is necessary for blazerc expansion, which occurs first in command order, then blazerc order. RELNOTES: None. PiperOrigin-RevId: 174343241
* Expose Apple Multi-architecture Split Transition to Skylark.Gravatar cparsons2017-11-02
| | | | | | | This omits validation for this transition, which will follow in a future change. RELNOTES: None. PiperOrigin-RevId: 174183651
* Force DexMapper (aka shuffle_jars) tool to partition large packages into ↵Gravatar kmb2017-11-01
| | | | | | | | multiple shards. Also fix some weirdnesses with how shard assignments were recorded. RELNOTES: None. PiperOrigin-RevId: 174095450
* Open source ZipFilterAction for use in Android testing.Gravatar ajmichael2017-11-01
| | | | | | | https://github.com/bazelbuild/bazel/issues/903 RELNOTES: None PiperOrigin-RevId: 174079202
* Add a 'estimateCurrentNumUniqueValues' method to MultisetSemaphore.Gravatar nharmata2017-11-01
| | | | | RELNOTES: None PiperOrigin-RevId: 174062560
* Rename ResourceFilter to ResourceFilterFactoryGravatar Googler2017-11-01
| | | | | | | | | | | In the next review, to handle issues around density filtering, ResourceFilterFactory will return another object that actually handles filtering. To ensure stuff is named properly, rename ResourceFilter to ResourceFilterFactory now so that the new class can be called ResourceFilter. This is a straightforward automated refactor, followed with some automated reformatting to make linting happy. I used the name ResourceFilterFactory, rather than the more concise ResourceFilters, as this class actually contains state (both around what filtering should currently do and about what resources were filtered out) and isn't just a helper class. RELNOTES: none PiperOrigin-RevId: 174049618
* Clean up LocalResourceContainer.BuilderGravatar Googler2017-11-01
| | | | | | | | | | | | | LocalResourceContainer.Builder is referenced a bunch of times, but most of those calls are identical. Replace them with a couple of factory methods. This lets us make the builder private. Additionally, LocalResourceContainer called attributeError() on the 'resources' attribute, even though 'resource_files' is now used most of the time instead. Now, the error is always given for the correct attribute. RELNOTES: none PiperOrigin-RevId: 174038035
* Move CppConfiguration#toolchainNeedsPic, #getRuntimeSysroot, andGravatar cpeyser2017-10-31
| | | | | | #getSolibDirectory to CcToolchainProvider. PiperOrigin-RevId: 174032021
* Add test asserting test_suite exclusion behaviorGravatar Googler2017-10-31
| | | | | | | | | test_suite expansion occurs after the target patterns are all processed. Otherwise, excluding a package can exclude tests from entirely different packages, which is counter-intuitive. This behavior was intentionally removed in unknown commit in 2012 and then inadvertently reintroduced in unknown commit in 2015. But I think the current behavior is more intuitive (and as of https://github.com/bazelbuild/bazel/commit/0dffc49f528c4c6e641221060e41aa6896310bdf is documented). RELNOTES: None. PiperOrigin-RevId: 173984189
* Remove --incremental_dexing_binary_types.Gravatar ajmichael2017-10-31
| | | | | | | It has been set to all for a bit now. It is not in any teams blazerc/tap configs. RELNOTES: --incremental_dexing_binary_types has been removed. All builds are supported by incremental dexing (modulo proguard and some blacklisted dx flags). PiperOrigin-RevId: 173931117
* Migrate CppConfiguration#supportsGoldLinker, supportsDynamicLinker,Gravatar cpeyser2017-10-31
| | | | | | supportsEmbeddedRuntimes, supportsExecOrigin to CcToolchainProvider. PiperOrigin-RevId: 173928009
* Default to not including library R classes in android_binary runtime classpathGravatar Googler2017-10-31
| | | | | | | | These classes should not be used by anything since the binary regenerates updated R classes. RELNOTES: none PiperOrigin-RevId: 173906178
* Make AndroidRuleClasses#hasProguardSpecs less fragile.Gravatar ajmichael2017-10-31
| | | | | | | Keeps the semantics the same. RELNOTES: None PiperOrigin-RevId: 173899927
* Move TransitiveTargetKey to a dedicated top-level classGravatar ulfjack2017-10-30
| | | | PiperOrigin-RevId: 173873310
* Compute canonical list of options using OptionValueDescription's tracking of ↵Gravatar ccalvarin2017-10-30
| | | | | | | | | | | | | instances. Stop storing the canonical list of arguments separately. For the canonicalize-flags command, we want to avoid showing options that either have no values in their own right (such as expansion options and wrapper options) and instances of options that did not make it to the final value. This is work we already do in OptionValueDescription, so we can generate the canonical form from the values tracked there, instead of tracking it separately. This means the canonical list is more correct where implicit requirements are concerned: implicit requirements are not listed in the canonical form, but now the values they overwrote will be correctly absent as well. Use this improved list for the effective command line published to the BEP. RELNOTES: Published command lines should have improved lists of effective options. PiperOrigin-RevId: 173873154
* Thread FileSystem through to a single Path#delete call site.Gravatar tomlu2017-10-30
| | | | | | This requires a fairly large amount of changes to fundamental objects like BlazeRuntime, Executor, and so on, as well as changing a lot of test code to thread the file system through. I expect future CLs to be much smaller. PiperOrigin-RevId: 173678144
* Rename ExternalPackageBuilder into WorkspaceFactoryHelperGravatar Damien Martin-Guillerez2017-10-30
| | | | | | | | This is indeed an helper for the WorkspaceFactory. There is no state in that class, it is just a namespace for static methods. Change-Id: I917237639e9e8a366b2b466ce40c45514007209c PiperOrigin-RevId: 173669872
* Split apart options that should only be set by the client from ↵Gravatar ccalvarin2017-10-27
| | | | | | | | | CommonCommandOptions. client_env and default_override stand apart from the other common options. They can be very long, and should only be used by the environment setup. They should ideally not be passed by option at all, but in the RunRequest proto message, but for now, isolate them so that they don't clutter the common command options, which are passed all over the place. RELNOTES: None. PiperOrigin-RevId: 173592980
* Fix SelectorList.isListType to properly consider all classes that can be ↵Gravatar jcater2017-10-27
| | | | | | assigned to java.util.List, not just ArrayList. PiperOrigin-RevId: 173577936
* Modify android_instrumentation_test.instrumentation to accept android_binary ↵Gravatar jingwen2017-10-27
| | | | | | | | | instead of android_instrumentation. GITHUB: #903 RELNOTES: None. PiperOrigin-RevId: 173572553
* Implement android_binary.instruments attribute.Gravatar jingwen2017-10-27
| | | | | | | | | android_binary now takes an android_binary in the `instruments` attribute. If the attribute is explicitly specified, an AndroidInstrumentationInfo provider is included in the RuleConfiguredTarget, which android_instrumentation_test can use. Having the provider allows android_instrumentation_test to check and fail if it tries to depend on an android_binary that is not instrumenting anything. RELNOTES: None. PiperOrigin-RevId: 173547240
* Allow/require callers of AbstractPackageLoader to set Skylark semantics ↵Gravatar brandjon2017-10-27
| | | | | | | | | | | explicitly Previously the default semantics were used unconditionally. Allowing non-default semantics is a feature. Requiring semantics to be specified explicitly helps to avoid unintentional divergence from the caller's intended semantics. We recently did the same thing for Skylark's Environment.Builder (https://github.com/bazelbuild/bazel/commit/b368b39f8ba1e8e8a67af50e5ade9127b2b149d7). Also pass Skylark semantics through Package.Builder.Helper, so that the extra verification done for shell tests uses the same semantics as the build. RELNOTES: None PiperOrigin-RevId: 173544885
* Adds "-fno-autolink" to ObjC compilation actions to avoid using the autolink ↵Gravatar kaipi2017-10-27
| | | | | | feature, as it doesn't play very well with bazel's deduplication of shared dependencies. PiperOrigin-RevId: 173531808
* Add platform_common.MakeVariableInfo so that Skylark code has access to the ↵Gravatar lberki2017-10-27
| | | | | | | Make variables provider. RELNOTES: None. PiperOrigin-RevId: 173527191
* Automated rollback of commit 0a63dadf4eafbae1730f88644b0c537fb1c16d5c.Gravatar dslomov2017-10-26
| | | | | | | | | | | | | | | | *** Reason for rollback *** This has broken rules_docker: https://ci.bazel.io/blue/organizations/jenkins/Global%2Frules_docker/detail/rules_docker/243/pipeline/ *** Original change description *** Properly escape GitHub repository download URL for git_repository w/ sha256 Addresses #3661 Closes #3770. PiperOrigin-RevId: 173525982
* BuildEventStreamer: allow final messagesGravatar aehlig2017-10-26
| | | | | | | | | | After receiving a BuildCompletingEvent, allow some final late messages, but only those not yet seen and announced by that BuildCompletingEvent. This mechanism will be used in a follow-up change to add a message with tool statistics. Change-Id: I979bec5bd946208068faff9a4ddd5245a769f096 PiperOrigin-RevId: 173514552
* Remove the runfiles middleman from py_binary's data runfiles.Gravatar Benjamin Peterson2017-10-26
| | | | | | | | | | | | | | This requires polluting Runfiles and RuleConfiguredTargetBuilder with some custom infrastructure to lift a py_binary runfiles middleman into the FilesToRunProviders and output groups of its reverse dependency. That can all go away when the --experimental_build_transitive_python_runfiles transition is complete. This is another step towards https://bazel-review.googlesource.com/c/bazel/+/14010. Change-Id: Ib750d72d4be42324c8edec485707480690b9fc9c PiperOrigin-RevId: 173514090
* Add a regression test for expand_locationGravatar ulfjack2017-10-26
| | | | | | | I accidentally broke expand_location in https://github.com/bazelbuild/bazel/commit/ca77f608e486bf7aa762565d25bf7b9e30f2268c, so here's a test that would have prevented that. PiperOrigin-RevId: 173513845
* Automated rollback of commit ca77f608e486bf7aa762565d25bf7b9e30f2268c.Gravatar ulfjack2017-10-26
| | | | | | | | | | | | | | | | | This also rolls back unknown commit. *** Reason for rollback *** Affected expand_location Skylark API semantics - it no longer accepts ${abc} or plain dollar signs, but complains. *** Original change description *** Extend TemplateExpander to handle $(func param) expansion Rewrite the Expander to use the new functionality; also rewrite the Skylark expand_location function to use it. PiperOrigin-RevId: 173508888
* Remove OS/Xcode versions (and thus package loading) from ↵Gravatar lberki2017-10-26
| | | | | | | | | | | | | AppleConfiguration.Loader. This is a roll-forward of https://github.com/bazelbuild/bazel/commit/f9a379157d1e992390c5b6f0b75ef853e0870689, which was rolled back in https://github.com/bazelbuild/bazel/commit/0446714686119dd97f8d1f99290f98db91a65e44. Fixes #3424 (again!) 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_versi... PiperOrigin-RevId: 173505814
* Internal changeGravatar kmb2017-10-26
| | | | PiperOrigin-RevId: 173451767
* remove references to legacy_native_support. it is a no-op.Gravatar ajmichael2017-10-26
| | | | | RELNOTES: None PiperOrigin-RevId: 173443657
* Windows,JNI,logging: improve error messagesGravatar Laszlo Csomor2017-10-26
| | | | | | | | | | | | | | In this commit: - introduce the MakeErrorMessage function, which creates a structured error message with file and line information of the error's origin - update all error messages in the Windows JNI library - simplify GetLastErrorMessage to just convert an error code to string, without prepending a cause Change-Id: Ia8162bfdaee37d4b7ccb3a46d6c8a861b0a1bd94 PiperOrigin-RevId: 173402968
* Trim function params in TemplateExpanderGravatar ulfjack2017-10-25
| | | | | | | | | | | There is a MacOS integration test that checks that we're trimming before looking up labels, but it only checks for genrules, which aren't using this code path yet. This was changed in https://github.com/bazelbuild/bazel/commit/1a8d6b888ce532f5e053ecab37874740ce61e37f and we could see breakages in non-genrule usage if a release picks up that change but not this. PiperOrigin-RevId: 173393718
* Do not create instance of ExternalPackageBuilderGravatar Damien Martin-Guillerez2017-10-25
| | | | | | | | This class is a legacy remains of an actual builder and this is a first step to clean that up. Change-Id: Id54360641e9f779259c3819fdde286643928cca4 PiperOrigin-RevId: 173378325
* Move CppConfiguration#getStaticRuntimeLibsLabel and #getDynamicRuntimeLibsLabelGravatar cpeyser2017-10-25
| | | | | | to CcToolchainProvider. PiperOrigin-RevId: 173301847
* Move CppConfiguration#getAbi and #getAbiGlibcVersion to CcToolchainProvider.Gravatar cpeyser2017-10-25
| | | | PiperOrigin-RevId: 173287598
* Extend TemplateExpander to handle $(func param) expansionGravatar ulfjack2017-10-25
| | | | | | | Rewrite the Expander to use the new functionality; also rewrite the Skylark expand_location function to use it. PiperOrigin-RevId: 173280839
* Add unused, optional source_properties attribute to android_sdk.Gravatar ajmichael2017-10-25
| | | | | RELNOTES: None PiperOrigin-RevId: 173258794
* Parser: fix incorrect end location for statement suites.Gravatar fzaiser2017-10-24
| | | | | | | This used to be annoying for Skylint. RELNOTES: none PiperOrigin-RevId: 173249428
* Windows, jni: Don't close stdout/stderr in nativeWaitFor functionGravatar Yun Peng2017-10-24
| | | | | | | | | | | | | | | | | | | | | | | | These two close operations were added to work around #1708, but caused #2675. We found the root cause of the hanging problem in #1708 is a race condition when creating Windows processes: When Bazel trys to create two processes, one for a local command execution, one for starting the worker process. The worker process might accidentally inherits handles opened when creating the local command process, and it holds those handles as long as it lives. Therefore, ReadFile function hangs when handles for the write end of stdout/stderr pipes are released by the worker. The solution is to make Bazel native createProcess JNI function explicitly inheirts handles as needed, and use this function to start worker process. Related: http://support.microsoft.com/kb/315939 Fixed https://github.com/bazelbuild/bazel/issues/2675 Change-Id: I1c9b1ac3c9383ed2fd28ea92f528f19649693275 PiperOrigin-RevId: 173244832
* Automated rollback of commit e9b10399f6a148a3d20442f2c5020b05fa891873.Gravatar twerth2017-10-24
| | | | | | | | | | | | *** Reason for rollback *** Breaks ~2k ios targets, see b/68179560 *** Original change description *** Move hard-coded compilation-mode-specific flags in ObjcConfiguration. PiperOrigin-RevId: 173239463
* Record dependencies when directly calling moved interface methods.Gravatar kmb2017-10-24
| | | | | | RELNOTES: None. PiperOrigin-RevId: 173154512