aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Enable manual trimming of config_feature_flags.Gravatar mstaib2018-05-16
| | | | | | | This enables users of config_feature_flags to specify the flags used by the transitive closure of a particular target in the transitive_configs attribute of all targets. It also adds a flag - --enforce_transitive_configs_for_config_feature_flag - which enforces this specification and uses it to trim the set of flags available to that target. RELNOTES: None. PiperOrigin-RevId: 196846092
* Add libc_top attribute to cc_toolchain in preparation for moving config data ↵Gravatar jcater2018-05-16
| | | | | | out of CppConfiguration. PiperOrigin-RevId: 196838680
* Port bazelrc flags into their own module.Gravatar ccalvarin2018-05-16
| | | | | | | | | This way the documentation logs them correctly as named "bazel," and describes the correct behavior. Needed for #4502. RELNOTES: None. PiperOrigin-RevId: 196837021
* Make inclusion of the zipper executable in CcToolchain depend solely on ↵Gravatar rosica2018-05-16
| | | | | | | | | | whether FDO optimization is used (--fdo_optimize or --fdo_profile) As part of the work of removing usage of c++ toolchain from CppConfiguration, CppConfiguration#isLLVMCompiler method needs to be removed. Currently, CppConfiguration#shouldIncludeZipperInToolchain (former CppConfiguration#isLLVMOptimizedFdo) method uses the CppConfiguration#isLLVMCompiler method to determine whether the compiler is LLVM and conditionally includes the zipper if the compiler is LLVM and FDO optimization is in place. Instead of rerouting the information on the compiler and FDO profile through FeatureFlagInfo, we make the inclusion of the zipper executable depend only on usage of FDO optimization. PiperOrigin-RevId: 196819907
* C++: Renames CcExecutionDynamicLibrariesInfo to CcExecutionDynamicLibrariesGravatar plf2018-05-16
| | | | | | | Since it's not a provider, it doesn't need the Info suffix anymore. RELNOTES:none PiperOrigin-RevId: 196793557
* Migrate some serialization tests to use SerializationTester rather than ↵Gravatar janakr2018-05-15
| | | | | | | | AbstractObjectCodecTest. I saw these tests causing errors in one version of the sequel unknown commit when testing detection of junk data, but not with this clean-up. Also use the String codec provided in the context in AutoCodecProcessorTest. PiperOrigin-RevId: 196756537
* Add --ignore_all_rc_files startup options.Gravatar ccalvarin2018-05-15
| | | | | | | | | | | | | This overrides --bazelrc and --[no]master_bazelrc regardless of order. Like --bazelrc and --[no]master_bazelrc, it cannot be mentioned in an rc file, this would be a contradiction. This flag is useful for testing, and for having a version-agnostic way to turn off all rc files, such as in the canonical command line reporting. Now that blazerc and bazelrc are separate, this is necessary. If explicit values for --bazelrc or --master_bazelrc are provided which are now ignored, Bazel will warn the user. #4502 Alternatives considered - We could avoid this flag but would need to have some well-documented, reusable list of the startup flags that effectively come to the same effect. This would be necessary in our integration tests and in the CommandLineEvent and other places where rc files need to be completely disabled for correctness. We decided that this startup option was more straightforward and usable for both users and Bazel devs: it shouldn't be used when more fine-grained control is needed, but provides warnings if users are likely to be confused by the outcome. RELNOTES: None. PiperOrigin-RevId: 196750704
* Optimizes performance of ActionFS staging and eliminates ActionFS updates.Gravatar shahan2018-05-15
| | | | | | | | | Extracts a class, InputArtifactData to hold the input data instead of using a raw map. This provides the flexibility needed to support both ActionFS and existing code so ActionFS does not need to rekey the input data. Uses the smaller, getDeclaredIncludeSrcs instead of getAllowedDerivedInputs when possible for staging optional inputs in ActionFS. PiperOrigin-RevId: 196736703
* Change TestSuiteExpansionValue to contain Labels instead of Targets.Gravatar cpeyser2018-05-15
| | | | PiperOrigin-RevId: 196719433
* Potentially allow children of a dirty node to be missing from the graph. ↵Gravatar janakr2018-05-15
| | | | | | Also pass the GraphInconsistencyReciever into SkyframeExecutor as a parameter. PiperOrigin-RevId: 196716642
* Implement a limit for named_set_of_file eventsGravatar ulfjack2018-05-15
| | | | | | | | | | | This adds a command-line option which can be used to force Bazel to split up very large events, e.g., events with hundreds of thousands of entries. This is rare, but happens occasionally. It would be better to control the maximum event size directly, but that is significantly more difficult to do here. PiperOrigin-RevId: 196690600
* Replace --experimental_android_enforce_strict_deps_for_binaries_under_test ↵Gravatar cushon2018-05-15
| | | | | | with a package whitelist PiperOrigin-RevId: 196688645
* Add option --experimental_discard_actions_after_execution in order to turn ↵Gravatar janakr2018-05-15
| | | | | | | | it off after a release. Discarding actions hasn't been shown to have a significant positive effect on heap memory usage, after careful research by mschaller@. It's holding back other projects (threading Fileset metadata through) and adding complexity, so it's time to kill it. Out of an abundance of caution, I'll keep actions in memory via a flag flip, then, if it sticks, I'll change the default, and then I'll unwire everything. PiperOrigin-RevId: 196682768
* C++: Deletes CcLinkParamsInfoGravatar plf2018-05-15
| | | | | | | | This class is not necessary anymore. We can use CcLinkParamsStoreImpl directly which has been renamed to CcLinkParamsStore. RELNOTES:none PiperOrigin-RevId: 196656488
* Allow more characters in labels.Gravatar twerth2018-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partly addresses #374. Specifically allow !%^`"'&;<>?[]{|} in target and package names. It's actually simpler now to declare what we don't allow. In target names: 0-31 (control characters) 58 ':' (colon) 92 '\' (backslash) 127 (delete) In package names: 0-31 (control characters) 58 ':' (colon) 64 '@' (at-sign) 92 '\' (backslash) 127 (delete) - '\' is a path segment separator on Windows, and allowing it can lead to silent output file conflicts and - therefore - data corruption. We may be able to allow it in the future, but I didn't want to make that call. - ':' is a special character that Bazel interprets as the package name / target name separator. - '@' in package names can probably be allowed; at the beginning of a label it indicates a workspace name, but not within a segment. We actually have some tests that disallow it specifically, but those can probably just be deleted; however, it does require a bit of investigation, so I decided to delay that change. It is possible that we don't correctly escape filenames in all cases. Also note that the shell may require escaping for specific characters, and that Bazel treats a single '*' (star) target name specially when given on the command line. RELNOTES: Bazel now allows almost all 7-bit ASCII characters in labels. PiperOrigin-RevId: 196650651
* Slightly refactor SpawnAction to improve env handlingGravatar ulfjack2018-05-15
| | | | | | | This is in preparation for fixing env handling as well as cache key (to use env) computations in subclasses of SpawnAction. PiperOrigin-RevId: 196626495
* Ease the configuration-related restrictions of several more tests.Gravatar mstaib2018-05-14
| | | | | | | | | Use update() and other methods which properly respect the trimming transition over those which don't. Avoid using the target configuration if the configuration actually used by a target is available. RELNOTES: None. PiperOrigin-RevId: 196588405
* Set JAVA_HOME for bazel_with_jdk_testGravatar cushon2018-05-14
| | | | | | | | The local JDK is now the default --javabase and needs to be available for these tests, see: https://github.com/bazelbuild/bazel/commit/849df36c5ad31ebe8791c4228321c38c6d0ae56c PiperOrigin-RevId: 196575260
* Pull caching up to BuildConfigurationValue$Key$Codec. Almost all ↵Gravatar janakr2018-05-14
| | | | | | | | BuildOptions$DiffForReconstruction serializations are reached in this way, so we get better efficiency. Also, it was already a custom codec, so less new handrolling. Also use serialization framework for FragmentClassSet, instead of doing serialization directly. Default FragmentClassSet should be a constant, so it will serialize down to a byte or three. Future changes can make all the classes constants as well, if we're getting misses on them. PiperOrigin-RevId: 196546279
* Remove swiftstdlibtoolwrapperGravatar thomasvl2018-05-14
| | | | | | | It is a left over from long ago, and nothing should be using it as the swift support is now via skylark rules and no longer native code. PiperOrigin-RevId: 196541787
* Extract logic for dealing with CROSSTOOL values and build variables into ↵Gravatar rosica2018-05-14
| | | | | | | separate class RELNOTES: None. PiperOrigin-RevId: 196517537
* C++: Renames CcCompilationContextInfo to CcCompilationContextGravatar plf2018-05-14
| | | | | | | Since it's not a provider, it doesn't need the Info suffix anymore. RELNOTES:none PiperOrigin-RevId: 196498526
* Add CcHostToolchainAliasRule.Gravatar dbabkin2018-05-14
| | | | | RELNOTES:none PiperOrigin-RevId: 196477775
* Windows, Java launcher: Support jar files under different drivesGravatar Yun Peng2018-05-14
| | | | | | | | | Create junctions to jar's directory when java launcher and its jar are under different drives Fixed https://github.com/bazelbuild/bazel/issues/5135 Change-Id: I21c5b28f5f36c1fe234f8b781fe40d526db846cc PiperOrigin-RevId: 196477704
* Use the local JDK as the default target javabaseGravatar cushon2018-05-14
| | | | | | and continue to use the embedded JDK as the default host_javabase. PiperOrigin-RevId: 196471714
* Add an IdentityHashMap to the BuildOptions.OptionsDiffForReconstruction codec.Gravatar mjhalupka2018-05-11
| | | | PiperOrigin-RevId: 196310244
* Wrap a comment line around 80 chars.Gravatar Googler2018-05-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 196272337
* Records profiling information for ActionFS staging and updates.Gravatar shahan2018-05-11
| | | | PiperOrigin-RevId: 196266567
* Automated rollback of commit feeccd8c0a5d97493cabfeb9481cf6f3800b9b84.Gravatar corysmith2018-05-10
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with correct handling for pseudo locale generation flags *** Original change description *** Only include generated resources when pseudo locales are asked for. CompileResources: generate pseudo locales into a separate compiled resource file when the pseudo locale flag is true and the locale is default (e.g. absent). The generated resources must be first in the returned list of compiled resource paths. This allows the user to define custom values to the pseudo locales (which, for some obscure reason, is accepted as a reasonable practice by aapt{,2}) AndroidResourceOutputs: record the type of compiled resource in the comment field of the zip entry for fast comparison. ResourceLinker: only include the generated resources when the pseudo locale is explicitly asked for. It's important to note that the ordering for compiled resources in the zip goes <generated>...<normal>...<default>. This means the default locale will overwrite the generated locale values. Annoying, but necessary, as that is current order before introducing this cl. RELNOTES:None PiperOrigin-RevId: 196159094
* Expose android_binary data processing methods to SkylarkGravatar asteinb2018-05-10
| | | | | | | | | | | | Create an AndroidBinaryDataInfo to wrap binary-specific artifacts that shouldn't be exposed for libraries. This is currently only the final resource APK. Continue to extract attribute references from lower-level methods and bubble them up to the top level. RELNOTES: none PiperOrigin-RevId: 196143940
* Codec for FluentIterable - needed to serialize results of Iterables.concat.Gravatar shahan2018-05-10
| | | | PiperOrigin-RevId: 196127040
* Internal changeGravatar Googler2018-05-10
| | | | PiperOrigin-RevId: 196113268
* Only include generated resources when pseudo locales are asked for.Gravatar corysmith2018-05-10
| | | | | | | | | CompileResources: generate pseudo locales into a separate compiled resource file when the pseudo locale flag is true and the locale is default (e.g. absent). The generated resources must be first in the returned list of compiled resource paths. This allows the user to define custom values to the pseudo locales (which, for some obscure reason, is accepted as a reasonable practice by aapt{,2}) AndroidResourceOutputs: record the type of compiled resource in the comment field of the zip entry for fast comparison. ResourceLinker: only include the generated resources when the pseudo locale is explicitly asked for. It's important to note that the ordering for compiled resources in the zip goes <generated>...<normal>...<default>. This means the default locale will overwrite the generated locale values. Annoying, but necessary, as that is current order before introducing this cl. RELNOTES:None PiperOrigin-RevId: 196111843
* Expose process_test_data (for android_test) to SkylarkGravatar asteinb2018-05-09
| | | | | | | | Explicitly work with rele attributes at (or closer to) the top level rather than deep in the code. RELNOTES: none PiperOrigin-RevId: 196004542
* Adds an action-scoped filesystem.Gravatar shahan2018-05-09
| | | | PiperOrigin-RevId: 195973862
* Add graceful failure for unsupported formatters in genqueryGravatar juliexxia2018-05-09
| | | | PiperOrigin-RevId: 195971237
* Get resource processing settings from method params instead of rule attrsGravatar asteinb2018-05-09
| | | | | | | | | | | | | | | | In a previous review, I left some setting controlled only by rule attributes. Now actually specify them in Skylark method params. Data binding and should mimic behavior in existing android_* rules. For library, aapt_version cannot be passed in; we use the flag value. I left the SDK attribute intact as it's private. People should be setting defaults in rules but otherwise overriding SDK with flags, not parameters. This mimics existing behavior. RELNOTES: none PiperOrigin-RevId: 195970351
* Remove cppConfiguration from LinkBuildVariablesGravatar hlopko2018-05-08
| | | | | | | | | This is to simplify the API that will eventually be exposed to Skylark. Working towards #4571. RELNOTES: None. PiperOrigin-RevId: 195785588
* Rename LinkStaticness to LinkingMode and unify with the other LinkingMode.Gravatar hlopko2018-05-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 195777400
* Make Aar provider into NativeInfoGravatar asteinb2018-05-07
| | | | | | | This provider needs to be the new type so we can expose Aar information in Skylark RELNOTES: none PiperOrigin-RevId: 195710606
* Stop collapsing NestedSet of deps in RClassGeneratorGravatar asteinb2018-05-07
| | | | | | | This collapsing should be avoided when possible, and punted on until execution when needed. RELNOTES: none PiperOrigin-RevId: 195695290
* Add absolute path handling to Rlocation implementation used for remote ↵Gravatar Googler2018-05-07
| | | | | | | | | | | | | execution on Windows from Java launcher. Previously the test case would fail because it tried to run a path like this: C:/temp/build-1dad9dd4-ee96-40c5-b551-c8ae12461e45/bazel-out/x64_windows-fastbuild/bin/foo/foo_test.exe.runfiles/C:/openjdk/bin/java.exe Passing presubmit: https://buildkite.com/bazel/google-bazel-presubmit/builds/2558#b83dbc25-d9ad-4d49-8f78-cde9d6810741 RELNOTES: N/A PiperOrigin-RevId: 195675424
* Rename Staticness to LinkerOrArchiver.Gravatar hlopko2018-05-07
| | | | | | | | | Staticness is confusing, I always have to investigate which is Staticness and which is LinkStaticness, and even in isolation staticness is not a great name. I believe LinkerOrArchiver is a better name :) RELNOTES: None. PiperOrigin-RevId: 195674810
* Relax requirements of skylark-exposed configuration fragmentsGravatar cparsons2018-05-07
| | | | | | | Since configuration fragments will extend from build API classes, @SkylarkConfigurationField no longer needs to annotate a method defined on a @SkylarkModule class. Ideally, we would ensure that a configuration fragment with a @SkylarkConfigurationField method implements an interface with @SkylarkModule, but this seems impossible to perform at the level of an annotation processor. RELNOTES: None. PiperOrigin-RevId: 195651344
* remote/caching: improve error messages for remote cachingGravatar Jakob Buchgraber2018-05-07
| | | | | | | | Only the last commit needs to be reviewed, as it's rebased on https://github.com/bazelbuild/bazel/pull/5101 Closes #5117. PiperOrigin-RevId: 195649921
* Sort entries by segment when building a parent node to prevent unordered ↵Gravatar James Judd2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory structures. When building a parent node from action inputs, the paths to the files are sorted. These paths are then broken down into segments and a tree structure is created from the segments. Problem is, the segments at each level of the tree structure are not sorted before they are added to the parent node. This can result in an unordered directory tree. For example, the sort order of this list of files ``` /foo/bar-client/bar-client_ijar.jar /foo/bar/bar_ijar.jar ``` is maintained when it becomes a tree structure ``` foo -> bar-client -> bar-client_ijar.jar bar bar_ijar.jar ``` which is out of order. Resolves: #5109 Closes #5110. PiperOrigin-RevId: 195649710
* More detach context that was attachedGravatar Googler2018-05-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 195586974
* Emit jdeps.proto when checking the dependencies of aar_import targets.Gravatar cnsun2018-05-04
| | | | | RELNOTES: none. PiperOrigin-RevId: 195497740
* Always detach context that was attachedGravatar Googler2018-05-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 195486038
* Migrate j2objc to only support java_proto_library.Gravatar tomlu2018-05-04
| | | | | | | | | Mostly this is removing a needless restriction on proto_library to have java_api_version and j2objc_api_version set. The rest was already working. Tons of tests had to be updated. RELNOTES: None PiperOrigin-RevId: 195450685