aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Fix resource shrinking to filter densities and include assets.Gravatar corysmith2017-11-09
| | | | | RELNOTES: None PiperOrigin-RevId: 175033155
* Prefix all --bes_keywords with "user_keyword=<keyword>" before publishing to ↵Gravatar Googler2017-11-07
| | | | | | | | | | BES. - Add a prefix to user provided keywords, so it can be distinguished from keywords provided directly by Bazel. - Keywords are also stored in a Set to avoid duplicates. PiperOrigin-RevId: 174872442
* Introduce cc_toolchain_type, which exports c++ make variables. UseGravatar cpeyser2017-11-07
| | | | | | //tools/cpp:toolchain_type as the canonical c++ toolchain. PiperOrigin-RevId: 174759558
* Add more assertions about test suite expansion behaviorGravatar Googler2017-11-07
| | | | | | | | | | | Characterizing this correctly this time: Target patterns are evaluated with two different sets of semantics. For determining which targets to build, only test suites in exclusion target patterns are expanded. For determining which tests to run (or determining which targets to build if --build_tests_only is set), test suites in all target patterns are expanded. In each case, test suites are expanded for each target pattern individually, not for the whole set of targets after the list of target patterns is processed. Also update a related code comment. The newer implementation for this logic already has equivalent tests for this behavior, in particular testFilterNegativeTestFromTestSuite and testNegativeTestSuiteExpanded in LoadingPhaseRunnerTest. RELNOTES: None PiperOrigin-RevId: 174756583
* Break dependency on vfs from the interface of syntax and cmdline.Gravatar tomlu2017-11-06
| | | | | | | | These libs are exposed externally, implying that the vfs is also exposed externally. We break out PathFragment from vfs to still use this in their interface. This class is a much smaller dependency than the entire vfs. PiperOrigin-RevId: 174729373
* Add optional user execution time and system execution time fields to ↵Gravatar ruperts2017-11-06
| | | | | | | TerminationStatus, and also add a TerminationStatus.Builder and tests. RELNOTES: None. PiperOrigin-RevId: 174557303
* Use Durations to store wall, user and system execution time in SpawnResults, ↵Gravatar ruperts2017-11-06
| | | | | | | and make cumulative execution times available in ActionResults. RELNOTES: None PiperOrigin-RevId: 174553272
* Expose late-bound-attributes to Skylark.Gravatar cparsons2017-11-06
| | | | | RELNOTES: Late-bound attributes are exposed to skylark. This is a new API (`configuration_field()`) to depend on certain configuration-defined targets from skylark rules. PiperOrigin-RevId: 174534104
* Switch ExtraActionFactory and GenRuleBase to the Expander APIGravatar ulfjack2017-11-06
| | | | | | | This changes the order in which expansions happen, which could change the semantics in subtle ways. PiperOrigin-RevId: 174518778
* Make ErrorInfo#toString more informative.Gravatar janakr2017-11-06
| | | | PiperOrigin-RevId: 174508154
* Move CppConfiguration#getHostSystemName, #getTestOnlyLinkOptions, ↵Gravatar cpeyser2017-11-06
| | | | | | #getObjCopyOptionsForEmbedding, #getLdOptionsForEmbedding and #getDefaultSysroot to CcToolchainProvider. PiperOrigin-RevId: 174508128
* Automated rollback of commit 3181c2f1362622985aca24747ed9512573d25dc0.Gravatar corysmith2017-11-06
| | | | | RELNOTES: None PiperOrigin-RevId: 174502289
* Simplify the merge code, and fix a few incorrectly declared tests.Gravatar corysmith2017-11-06
| | | | | RELNOTES: None PiperOrigin-RevId: 174485947
* 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