aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Fix more linter errorsGravatar ruperts2017-10-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 170955877
* tests for new desugar packageGravatar kmb2017-10-06
| | | | | | RELNOTES: none PiperOrigin-RevId: 170893783
* add flags to desugar to emit metadata that can be used for double-checking ↵Gravatar kmb2017-10-06
| | | | | | | | correctness of default and static interface desugaring. RELNOTES: none PiperOrigin-RevId: 170779637
* Fixing displayed retry attempts one-off error, when the error is non-retriable.Gravatar olaola2017-10-06
| | | | | | | | Adding unit tests. TESTED=unit tests RELNOTES: None PiperOrigin-RevId: 170750220
* In apple integration tests, for fat simulator builds, specify a ↵Gravatar cparsons2017-10-06
| | | | | | | | | minimum_os_version < 11.0, as they are unsupported at 11.0. Fixes https://github.com/bazelbuild/bazel/issues/3841. RELNOTES: None. PiperOrigin-RevId: 170731919
* Skylark parser: make the end position of location ranges inclusive.Gravatar fzaiser2017-10-06
| | | | | | | | | Previously, the end line and column of a location were the position past the actual end of a location. This makes sense for the end offset, because one can use `input.substring(startOffset, endOffset)` to get the string belonging to an ASTNode. However the line and column (as opposed to the offset) aren't used for that. Therefore I made the change that the end line and column now point to the last character in the location. This is also they way every compiler I know does it. RELNOTES: none PiperOrigin-RevId: 170723732
* Rewrite LocationExpanderGravatar ulfjack2017-10-02
| | | | | | | | | | | | | | | Split up the functionality into separate classes, and test each independently. (Keep one integration test to make sure it still works together.) This is in preparation for adding another location function for runfiles paths. Currently we have to decide ahead of time whether to expand artifacts as exec paths or root-relative (runfiles) paths, but there are cases where we can't make that decision ahead of time and / or need both to coexist, even in the same attribute. Progress on #2475. PiperOrigin-RevId: 170691666
* Extract Fileset manifest parsing out of SpawnInputExpanderGravatar ulfjack2017-10-02
| | | | | | | | | | - add a mode to control how to handle relative symlinks - if set, attempt to resolve relative symlinks in manifests by looking for another entry that defines a file with the intended symlink target (we don't do recursive resolution for now) - add more test coverage; fix a bug in handling empty target locations PiperOrigin-RevId: 170691492
* Prevent overriding android_library srcless deps configuration value from ↵Gravatar jingwen2017-10-02
| | | | | | | HostTransition. RELNOTES: None. PiperOrigin-RevId: 170549656
* Fix aapt2 actions to use the compiled intermediate resource files for ↵Gravatar Googler2017-10-02
| | | | | | | linking. Also include assets in the aapt2 packaging action. RELNOTES: none PiperOrigin-RevId: 170532322
* Use intermediate compiled resource symbols for linking rather than static ↵Gravatar Googler2017-10-02
| | | | | | | resource library APK's. RELNOTES: none PiperOrigin-RevId: 170517806
* Don't symlink into the execroot if possible in SymlinkAction: instead, ↵Gravatar janakr2017-10-02
| | | | | | symlink directly to the target artifact. Also offer the option to not provide the package roots to create the execroot: we would like to avoid the execroot if possible. PiperOrigin-RevId: 170515263
* build_event_stream_test: fix usage of ed(1)Gravatar Klaus Aehlig2017-09-29
| | | | | | | | | | | | | | Unfortunately the various ed(1)s are different in subtle ways. The difference that hit us here is the different treatment of the implicit 'e' command when ed is started with a file as argument; GNU ed writes the answer of that command (i.e., the number of bytes read) on stderr, whereas ed on FreeBSD writes it on stdout. So, let's merge the two output channels and throw away the first answer explicitly. Fixes #3842. Change-Id: I4ef394957cdc316f896b54ca218d4f118465caff PiperOrigin-RevId: 170506490
* Switch ExtraActionFactory over to the new Expander interfaceGravatar ulfjack2017-09-29
| | | | PiperOrigin-RevId: 170494940
* Disable testCommandHonorsEnvironment on MacOS for nowGravatar ulfjack2017-09-29
| | | | | | Temporary workaround for #3795. PiperOrigin-RevId: 170473363
* Pass CppSemantics down to the CppLinkActionBuilderGravatar hlopko2017-09-29
| | | | | | | | | Currently CppLinkActionBuilder is not using CppSemantics, but it will when we use full CppCompileAction for linkstamp compiles. This cl is a preparation for that. RELNOTES: None. PiperOrigin-RevId: 170467826
* BEP: correctly report AliasConfiguredTargetsGravatar Klaus Aehlig2017-09-29
| | | | | | | | | When reporting the completion of a target specified by an alias, report the label of the alias, not that of the target being aliased to. Change-Id: If8416ceef73b01b7531ffa0012251f25a4e9f062 PiperOrigin-RevId: 170466076
* Windows, sh tests: fix corrupt installation errorGravatar Laszlo Csomor2017-09-29
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3618 Change-Id: I1533088d4d51dc0510de5cd5b392edec95458057 PiperOrigin-RevId: 170458069
* Move serialization test utilities from test/ to main/Gravatar brandjon2017-09-29
| | | | | | | | | This is so other packages can depend on them without violating our style guide. (Dependencies on test/ packages should be limited to aggregating test suites.) The target is also renamed from ".../serialization:serialization-test-base" to a new subpackage, ".../serialization/testutils:testutils". RELNOTES: None PiperOrigin-RevId: 170426906
* Fix various linter errorsGravatar ruperts2017-09-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 170418147
* Add flag to Blaze to double-check correct desugaring in Android deploy.jarsGravatar kmb2017-09-29
| | | | | | (without affecting other uses of singlejar) PiperOrigin-RevId: 170411730
* Support --positions flag in DexBuilder, for consistency with dxGravatar kmb2017-09-29
| | | | | | RELNOTES: none PiperOrigin-RevId: 170379445
* Remove compilation and bundling attributes from apple_binary and ↵Gravatar cparsons2017-09-29
| | | | | | | apple_static_library. RELNOTES: apple_binary and apple_static_library no longer support compilation attributes such as 'srcs'. If this breaks any existing targets, you may migrate all such attributes to a new objc_library target and depend on that objc_library target via the 'deps' attribute of apple_binary or apple_static_library. PiperOrigin-RevId: 170373794
* Checking both old and new error fields on remote execute operation.Gravatar olaola2017-09-29
| | | | | | | The old field is the error on Operation proto. The new field is the ExecuteResponse status field. Note that the new field will also allow us to fetch logs for timing out tests, resolving a TODO, but this is not yet done is this change. PiperOrigin-RevId: 170370676
* New depset() APIGravatar dslomov2017-09-29
| | | | | | | | | | | | | `depset` constructor has new arguments, `direct` and `transitive`. `items` argument is deprecated and after its removal `direct` will become a sole positional argument. If `transitive` and `items` are specified, `items` must be a list of direct elements. In the absence of `transitive` the value of `items` can also be a depset, but that behavior is deprecated. RELNOTES: New depset API PiperOrigin-RevId: 170346194
* Clarify Mutability invariants, refactor some testsGravatar brandjon2017-09-29
| | | | | RELNOTES: None PiperOrigin-RevId: 170343759
* Make windows_export_all_symbols feature work for cc_binaryGravatar Yun Peng2017-09-28
| | | | | | | | | | | | | | | Now Bazel can also export symbols when building dynamic library from cc_binary. The interface library generated can be accessed by interface_library output group. The DEF file can still be accessed by def_file output group even when windows_export_all_symbols feature is not specified. This is useful when users want to filter symbols in DEF file before using it, for example, working around the 64K symbols number limit. Change-Id: I5b4dae0840e20037c00d500181c40b5faedfdcd8 PiperOrigin-RevId: 170330409
* Automated rollback of commit 411039319c1c67f2b9c8a7ada9e0a11d9bd4023f.Gravatar elenairina2017-09-28
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks coverage for android_test (N/A). Can be reproduced with unknown commit. *** Original change description *** Rollforward change of Java coverage logic. RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170322801
* Set --experimental_allow_android_library_deps_without_srcs to false by ↵Gravatar jingwen2017-09-28
| | | | | | | default in AndroidConfiguration. RELNOTES: android_library targets are no longer allowed to use deps to export targets implicitly; please use android_library.exports instead. PiperOrigin-RevId: 170243241
* Update bazel_apple_test to run on XCode 9.Gravatar John Cater2017-09-28
| | | | | | | Fixes #3827. Change-Id: Ie51650a3df6f40d2aa2c3ec016c00c98ce18c3de PiperOrigin-RevId: 170237678
* Expose JavaRuleOutputJarsProvider in java_common.provider, when available.Gravatar Googler2017-09-28
| | | | | | | | | | | | I'm not attempting to fix b/65618333 here, just handling one case currently breaking users (JavaInfo created via java_common.compile). My temporary workaround attempt to expose this information in the soy custom rule failed (unknown commit) -- to fix users we really need java_common changes. RELNOTES: Expose output jars and jdeps in java_common.provider, when available. PiperOrigin-RevId: 170236096
* Add 'compiler' and 'libc' attributes to cc_toolchain. If platform/toolchainGravatar cpeyser2017-09-28
| | | | | | | resolution is used, use these attribute values to choose a CToolchain from --crosstool_top instead of --compiler and --glibc. PiperOrigin-RevId: 170217186
* Skylark tests: add support for negative testsGravatar laurentlb2017-09-28
| | | | | | | | Multiple tests can be specified in the same file. An expected error (regex) can be specified in the test. RELNOTES: None. PiperOrigin-RevId: 170204356
* Limit the use of LinkCommandLine#getBuildInfoHeaderArtifacts and #getLinkstampsGravatar hlopko2017-09-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 170203679
* Mock cc toolchain is registered in module instead of in PlatformOptions.Gravatar cpeyser2017-09-28
| | | | PiperOrigin-RevId: 170200236
* BEP: also report baseline coverageGravatar Klaus Aehlig2017-09-27
| | | | | | | ...as part of the TargetComplete message. Change-Id: I8aa321a2810c3926db943f32cb1811a169e34dd7 PiperOrigin-RevId: 170171458
* Adds option bes_keywords BEP publishing.Gravatar Googler2017-09-27
| | | | PiperOrigin-RevId: 170121049
* Add new option categorization and tagging information to HelpCommand's output.Gravatar ccalvarin2017-09-27
| | | | | | | | | | | | | If setting flag --use_new_category_enum, group the options by the new categories in both the command line output and the "everything-as-html" output used for the generated docs at https://bazel.build/versions/master/docs/command-line-reference.html. In the html output, the effect and metadata tags are listed for each option, with links to their descriptions at the bottom of the page. The tags only appear in the terminal output in -l/--long/--help_verbosity=long, and only the names appear. This is still experimental as the majority of options do not yet use the new categorization system. The new output can be seen in command-line-reference.html format by adding the new flag to the "help everything-as-html" line in //src/main/java/com/google/devtools/build/lib:gen_command-line-reference. The html output is in the same order as before (by blaze rule, with inherited options not repeated), which means it still has duplicate options, that should ideally be fixed separately. I propose either dropping the high-level grouping and just grouping the options by documentation category, or potentially grouping them by optionsbase in some non-class-naming way, and listing the commands that they apply to, as more and more optionsbases are used by multiple commands without being inherited (for example, all BuildEventServiceOptions are listed 20 times). People probably use ctrl-f to navigate this page anyway. Once we know that we only list each option once, we can actually have links to the options, which will make it possible to have links in the expansion lists. Issue #3758 RELNOTES: added experimental --use_new_category_enum to the help command to output options grouped by the new type of category. PiperOrigin-RevId: 170116553
* Refactor srcs-less android_library rules: deps -> exports.Gravatar jingwen2017-09-27
| | | | | | | | | | | This CL captures the BUILD files and macro callers of native.android_library which use deps without srcs or local resources (exports_manifest, assets_dir, resource_files, etc). Using deps to implicitly export targets will be deprecated soon; please use android_library.exports instead. Follow-up CL to this LSC by brendandouglas@: https://docs.google.com/document/d/1h2ay0i9Tyun6rJ3a7cFT3YrMar9qYoCEv9dZ_pXOSzY LSC timeline:[] RELNOTES: None. PiperOrigin-RevId: 170090131
* Add charset to action key computation of ParameterFileWriteAction.Gravatar twerth2017-09-27
| | | | | RELNOTES: None PiperOrigin-RevId: 170088757
* Move the canonicalization of an option value to the option value itself.Gravatar ccalvarin2017-09-27
| | | | | | | Ideally, the canonical form we output from OptionUtils would be the same as for the command canonicalize-flags, but that must wait for dependencies to be cleaned up. Still, in the meantime, keep the --foo=1 normalization of --foo, and apply it to all other boolean flag values (t,true,yes,y, and false equivalents), so that the canoncalize-flags output is more canonical, even if it isn't using the --[no]foo form yet. RELNOTES: Boolean flag values will now get normalized to 1 or 0 in canonicalize-flags output. PiperOrigin-RevId: 170084599
* Add integration tests for android_sdk_repository() and ↵Gravatar jingwen2017-09-27
| | | | | | | | | | | | | | | | | | | | | android_ndk_repository() for testing invalid directory path attributes, and improve error descriptiveness. Moved AndroidRepositoryUtils logic into an abstract AndroidRepositoryFunction that Android{S,N}dkRepositoryFunction extends from. Examples of error messages: 1) Invalid NDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: in target '//external:android/crosstool': no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /tmp/RELEASE.TXT (No such file or directory) Unable to read the Android NDK at /tmp, the path may be invalid. Is thepath in android_ndk_repository() or ANDROID_NDK_HOME set correctly? If the path is correct, the contents in the Android NDK directory may have been modified. Please remove the NDK and download it again with the Android SDK manager. 2) Invalid SDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: no such package '@androidsdk//com.android.support': Expected directory at /tmp/platforms but it is not a directory or it does not exist. Unable to read the Android SDK at /tmp, the path may be invalid. Is the path in android_sdk_repository() or ANDROID_HOME set correctly? If the path is correct, the contents in the Android SDK directory may have been modified. Please remove the SDK and download it again with the Android SDK manager. GITHUB: #3740 RELNOTES: None. PiperOrigin-RevId: 170068567
* Use @SafeVarargs for AbstractObjectCodecTest constructorGravatar brandjon2017-09-27
| | | | | RELNOTES: None PiperOrigin-RevId: 170064410
* Make build_event_stream_test more portableGravatar aehlig2017-09-27
| | | | | | | | | - Make regexp to look for more strict; 'success' is too generic a keyword as it also matches the UI output 'Build did NOT complete successfully'. - Do not rely on backticks throwing away trailing carriage returns; mask them instead. PiperOrigin-RevId: 170063590
* Collect action cache hits, misses, and reasons for the misses.Gravatar jmmv2017-09-27
| | | | | | | | As a bonus, this brings in a bunch of new unit tests for the ActionCacheChecker. RELNOTES: None. PiperOrigin-RevId: 170059577
* Ensure that SpawnResults make their way back to the SpawnActions that caused ↵Gravatar ruperts2017-09-27
| | | | | | | them to be created. RELNOTES: None. PiperOrigin-RevId: 170058295
* Make UnionFileSystem accept all paths Bazel can throw at it.Gravatar ccalvarin2017-09-27
| | | | | | | | | Instead of relying on a character-by-character StringTrie, segment paths based on PathFragments. This means UnionFS can accept any path that Bazel stores internally, removing the ASCII limitations. This also means removing the ability to have a filesystem bound for sub-PathFragments, /foo/barbar, /foo/barqux could have the same filesystem bound at /foo/bar. This feature was tested for when a use case was envisioned, but it was never used, so removing it is safe. RELNOTES: None. PiperOrigin-RevId: 170054656
* Move ExternalPackageUtil to a new lib.repository package and simplify itGravatar ulfjack2017-09-26
| | | | | | | Move the nested Exception classes to top-level classes, remove unused functionality and move functionality only used in one place to that place. PiperOrigin-RevId: 170041246
* Rollforward change of Java coverage logic.Gravatar elenairina2017-09-26
| | | | | | | | | | RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170038845
* Add an option to control building of transitive py_binary runfiles trees. ,Gravatar Benjamin Peterson2017-09-26
| | | | | | | | | | | | | | | | | ) Currently, "bazel build :script" constructs the bazel-bin/python-prog.runfiles tree. We'd like to do anyway with this behavior but doing so is a backwards-incompatible change. To facilitate a transition, this CL adds an option --experimental_build_transitive_python_runfiles to control the behavior. In the example above, "bazel build --noexperimental_build_transitive_python_runfiles :script" won't construct bazel-bin/python-prog.runfiles. Change-Id: If4d5a84c956a0bbac9067dcf38a00e5732c450f2 PiperOrigin-RevId: 170038245