aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
...
* expectThrows has been renamed to assertThrowsGravatar cushon2018-02-24
| | | | | | More information: https://github.com/junit-team/junit5/issues/531 PiperOrigin-RevId: 186900384
* Integrates CodecScanner into SkyValueEncoder.Gravatar shahan2018-02-23
| | | | | | | | * Deletes a number of CODEC references, now superceded by registry functionality. * Minimal SkyKeySerializer modifications for correctness, as certain codec changes require codecs to be in available in the registry. PiperOrigin-RevId: 186834520
* A couple quality-of-life improvements for Bazel devs, in response to an ↵Gravatar nharmata2018-02-23
| | | | | | | | | | email from philwo@. (i) Only have TimestampGranularityMonitor log the first file of relevance. This reduces log spam, especially in tests, while still maintaining useful information in the logs. (ii) Don't have ExternalFilesHelper log the fact that it encountered an external file when we're in a unit test or an integration test. Tests, especially bazel tests that use external repositories, tend to involve lots of "external" files. RELNOTES: None PiperOrigin-RevId: 186799176
* Apply @AutoCodec to ExecutableSymlinkAction and SymlinkAction.Gravatar mjhalupka2018-02-23
| | | | | | | AbstractAction had getPrimaryInput() and getPrimaryOutput() which is why arguments are renamed. PiperOrigin-RevId: 186795064
* Add @AutoCodec to CcToolchainProvider, now that AutoCodec Runtime is available.Gravatar cpeyser2018-02-23
| | | | PiperOrigin-RevId: 186789093
* Set the correct include path for r13b's llvm-libc++ headers and fix ↵Gravatar jingwen2018-02-23
| | | | | | | | | | | | | | | compilation with @androidndk//:toolchain-libcpp with missing link time files. This fix needs a way to compare revision numbers, so the type of NdkRelease.majorRevision has been changed to Integer. This also paves the way for r15+ support. Fixes https://github.com/bazelbuild/bazel/issues/3641 Fixes https://github.com/bazelbuild/bazel/issues/3923 Fixes https://github.com/bazelbuild/bazel/issues/4677 TESTED=bazel test //src/test/shell/bazel/android:android_ndk_integration_test with r11, r12, r13, r14, r15 RELNOTES: Fixed include paths for NDK r13+ llvm-libc++ headers to `ndk/sources/cxx-stl/llvm-libc++/include` and `ndk/sources/cxx-stl/llvm-libc++abi/include` PiperOrigin-RevId: 186783465
* windows,tests: fix //src/test/py/bazel:py_testGravatar Laszlo Csomor2018-02-23
| | | | | | | | | | | | | | | | | The test was failing because it assumed Bazel was generating a runfiles tree for py_binary. On Windows, Bazel actually builds a zip file which contains the py_binary's runfiles tree. This commit adjusts the tests to assert the zip file's contents when the test is running on Windows. Fixes https://github.com/bazelbuild/bazel/issues/4673 Change-Id: I7544bff6c1866249b8e7982b1a106202d78e10d9 PiperOrigin-RevId: 186770549
* Add a new BuildOptions diff method that holds and pretty prints the ↵Gravatar juliexxia2018-02-23
| | | | | | different option values between two BuildOptions PiperOrigin-RevId: 186769975
* Remove some default cc toolchain definitions.Gravatar John Cater2018-02-23
| | | | | Change-Id: Idb0c9fe770cd73c2760bee92997063c4c9b2e94e PiperOrigin-RevId: 186768436
* Automated rollback of commit 7fe59b98eefc96a6310f0b0221d4e0f18e2a9000.Gravatar shreyax2018-02-23
| | | | | | | | | | | | *** Reason for rollback *** Fixed bug due to TransitiveTargetFunction requesting multiple Package dependencies when computing its aspect deps by only applying the optimization to TransitiveTraversalFunction. *** Original change description *** Automated rollback of commit cce164aed44aba1de244f0d764cd33a5cc6980b2. PiperOrigin-RevId: 186766812
* @AutoCodec for GenRuleAction.Gravatar cpeyser2018-02-23
| | | | PiperOrigin-RevId: 186765754
* Cleanup unused constantGravatar hlopko2018-02-23
| | | | | | | Should've been done in https://github.com/bazelbuild/bazel/commit/1a0e2e653c878c36b07880a0d31827fc8ddca353 RELNOTES: None. PiperOrigin-RevId: 186757061
* Document ambigious literal arguments when calling CcToolchainProvider ↵Gravatar Googler2018-02-23
| | | | | | | constructor RELNOTES: None. PiperOrigin-RevId: 186744674
* Enable ability to pass the resource apk to Robolectric so that it can ↵Gravatar dannark2018-02-22
| | | | | | | | | consume binary resources. This functionality is guarded by a flag, --experimental_android_local_test_binary_resources whose default value is false. If the flag is set to true, Bazel will generate the .ap_ and add the path to the .ap_ to the test_config.properties file. Bazel will still generate and pass the raw resources to Robolectric in both cases and so the cue to Robolectric that binary resources should be used is the presence of the path to the .ap_ in the test_config.properties file. RELNOTES: None PiperOrigin-RevId: 186708941
* Re-enable loading the PlatformInfo providers inGravatar John Cater2018-02-22
| | | | | | | | RegisteredExecutionPlatformsFunction, so that errors can be handled as early as possible. Change-Id: I2c73a9202d6bb02e04a32c18c4986e1e204aa9d5 PiperOrigin-RevId: 186694303
* Clarify parser error for load() statementsGravatar brandjon2018-02-22
| | | | | RELNOTES: None PiperOrigin-RevId: 186693205
* Increase test coverage of rootpath(s) and execpath(s) expansion to external ↵Gravatar richardwa2018-02-22
| | | | | | | workspaces RELNOTES: None. PiperOrigin-RevId: 186672083
* Add @AutoCodec to SpawnAction. Refactor the SpawnAction API for extra ↵Gravatar cpeyser2018-02-22
| | | | | | actions so that it is non-generic and does not persist a GeneratedExtension, which is hard to serialize. PiperOrigin-RevId: 186627440
* CcToolchain: add optional ar and as attributesGravatar Googler2018-02-22
| | | | | | | | These may be used to retrieve the ar and as programs associated with the compiler toolchain. RELNOTES: None. PiperOrigin-RevId: 186626548
* Fix linkstamping tests broken on bazel ciGravatar hlopko2018-02-22
| | | | | | | | | #4683 Fixes second part of failures. RELNOTES: None. PiperOrigin-RevId: 186609602
* Fix bazel tests depending on legacy gcc3 include pathGravatar hlopko2018-02-22
| | | | | | | | | #4683 Fixes one part of failures. RELNOTES: None. PiperOrigin-RevId: 186609441
* Remove the CppConfiguration member from CppLinkAction. This will makeGravatar cpeyser2018-02-22
| | | | | | CppLinkAction more suitable for serialization. PiperOrigin-RevId: 186598828
* Recompile linkstamps whenever any input of the owning action changes.Gravatar hlopko2018-02-22
| | | | | | | | | | | Linkstamps were not re-built when only volatile data changed, i.e. when we modified cc_binary source, linkstamp was not recompiled so we got old timestamps. The proper behavior is to recompile linkstamp whenever any input to cc_binary linking action changes. And the implementation in this cl solves this by adding all linking inputs as inputs to linkstamp compile action. RELNOTES: None. PiperOrigin-RevId: 186595143
* Add a test verifying legitmate path embeddingGravatar Klaus Aehlig2018-02-22
| | | | | | | | | | While rules that want to be called from different repositories may not make any assumptions about locations of their dependencies, they still may embed path obtained via expansion of $(location ...) into their files. Add tests verifying that this behavior is preserved. Change-Id: Id71588b4c128c15926d9190db507c9085fd17653 PiperOrigin-RevId: 186591069
* Fix test name in fallback xml when --run_under is used.Gravatar Benjamin Peterson2018-02-22
| | | | | | | | | | | When --run_under is used, the run-under wrapper will be injected in front of the normal test command line. So, it's incorrect to use the beginning of the command line to infer the test name. However, we can always get the underlying test executable with the TEST_BINARY environmental variable. Rename TEST_NAME to EXE to avoid future confusion. Fixes https://github.com/bazelbuild/bazel/issues/4588. Change-Id: I6fd05cca5e5441c13ee16290c4028ec84adec983 PiperOrigin-RevId: 186590311
* add ability to move individual core library methodsGravatar kmb2018-02-21
| | | | | | RELNOTES: None. PiperOrigin-RevId: 186565673
* PiperOrigin-RevId: 186532302Gravatar ahumesky2018-02-21
|
* Use a separate implicit dependency for dexbuilder in proguarded android buildsGravatar kmb2018-02-21
| | | | | | RELNOTES: None. PiperOrigin-RevId: 186511953
* Deflake ParallelEvaluatorTest.errorBubblesToParentsOfTopLevelValue: error ↵Gravatar janakr2018-02-21
| | | | | | cannot finish building until top registers a dep on it, and we can only know that by listening to the addReverseDep call. PiperOrigin-RevId: 186499232
* C++: Migrate CcCompilationInfo to NativeInfoGravatar plf2018-02-21
| | | | | | | | The old TransitiveInfoProvider is deprecated. Providers used from Skylark should use NativeInfo as specified in[] RELNOTES:none PiperOrigin-RevId: 186447814
* C++: Renames CppCompilationContext to CcCompilationInfoGravatar plf2018-02-21
| | | | | | | This is in preparation for migrating to the new way of specifying providers as described in[] RELNOTES:none PiperOrigin-RevId: 186436462
* Apply interface invocation desugaring to renamed core libraries. Fix ↵Gravatar kmb2018-02-20
| | | | | | | | invokespecial invocations for core interfaces. RELNOTES: None. PiperOrigin-RevId: 186404206
* Deletes POLYMORPHIC strategy. ObjectCodec now uses runtime type information ↵Gravatar shahan2018-02-20
| | | | | | to select a codec. PiperOrigin-RevId: 186378153
* Tool that scans a given Jar for references to select classes and outputs ↵Gravatar kmb2018-02-20
| | | | | | | | corresponding Proguard-style -keep rules RELNOTES: None. PiperOrigin-RevId: 186372769
* Adds ObjectCodecRegistry to {Des|S}erializationContext.Gravatar shahan2018-02-20
| | | | | | | | | | | | * AutoCodec now delegates to the registry. * Adds getSuperclass logic for resolving a codec. * Small cleanups for classes that break the registry. TODO after this change: * Explicit CODEC definitions are no longer needed and existing ones should be cleaned up. * POLYMORPHIC is no longer be needed and should be cleaned up. PiperOrigin-RevId: 186351845
* Inject the product name in the constructor where neededGravatar ulfjack2018-02-20
| | | | | | ...instead of passing it everywhere so we can rewrite the local env. PiperOrigin-RevId: 186316859
* Serialize MiddlemanAction and add strategy=Strategy.Polymorphic for Action andGravatar mjhalupka2018-02-20
| | | | | | AbstractAction. PiperOrigin-RevId: 186316435
* Decprecate native http_archiveGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | | | | | | Since the skylark implementation of http_archive provides all the features available in the native http_archive and a few more (patching), there is no need to have to rule implementations doing the same thing. Hence deprecate the native one as part of our plan of moving more functionality to skylark. RELNOTES: The native http_archive rule is deprecated. Use the Skylark version available via load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") instead. Change-Id: I107c2f25f5a37c67f56b4362e7c9d9ade8428c16 PiperOrigin-RevId: 186314624
* External repositories: document label expansionGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | Add a test demonstrating how a repository can provide a rule with an implicit dependency on a target in its own repository in a way that works both, locally and remotely without the need to know the name of the repository the rule resides in. Change-Id: I2446be1ba16a382576800f8141da17331e64f8b1 PiperOrigin-RevId: 186314462
* Roll forward of ↵Gravatar olaola2018-02-20
| | | | | | | | | | | | | | | | | | https://github.com/bazelbuild/bazel/commit/3904ac33a983fd8faebba1b52bcac5a3ff942029 (https://github.com/bazelbuild/bazel/commit/3904ac33a983fd8faebba1b52bcac5a3ff942029). Fix #4625 by running the test process in a sub-shell. Apparently, nested background processes interfere with SIGINT handling in bash. I don't 100% understand why and how, but I do have a small bash script that demonstrates the problem: script A that spawns a background process, sends it a SIGINT, and verifies it was received. The script works, *unless* run in the background by a process B; this extra layer of backgrounding cause process A's logic to stop working. See experimental/users/olaola/shell/ for examples. See also https://stackoverflow.com/questions/48847722/nested-background-processes-and-sigint-handling *** Original change description *** Fixing test-setup.sh occasionally missing stdout/stderr, on systems where "tail --pid" is supported. The solutions aren't mine, the new test was taken from Ola's unknown commit and the way to avoid race condition courtesy of sethkoehler@ Mitigates #4608 for compatible Linux systems. TESTED=presubmits, manual shell tests on new bazel RELNOTES: None PiperOrigin-RevId: 186312008
* Accept proto paths relative to proto_source_root as direct dependencies.Gravatar elenairina2018-02-20
| | | | | | | | | | | This will make protoc see as direct dependencies the .proto files that were included using the proto_source_root flag. Until now, Bazel passed to protoc the direct dependencies of a target as the path relative to the WORKSPACE, which made it fail when a shorter path, relative to the package was used. Progress on #4544. RELNOTES: None. PiperOrigin-RevId: 186294997
* Propagating whether there was a cache hit in the SpawnResult.Gravatar olaola2018-02-20
| | | | | | | | So far, nobody uses it, but I want to start using this field soon. TESTED=unit test RELNOTES: None PiperOrigin-RevId: 186290375
* Add additional tests for Filesets with symlinksGravatar ulfjack2018-02-20
| | | | | | | | | - Make sure that we correctly resolve symlinks starting with ./ and ../. This is currently failing, although it's working at head. From my reading, https://github.com/bazelbuild/bazel/commit/a729b9b4c3d7844a7d44934bf3365f92633c0a60 changes PathFragment.getRelative to always normalize the return value, which it wasn't doing before. PiperOrigin-RevId: 186289431
* http_archive: allow parameter for a single URLGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | | ...to ease transition from the native http_archive rule. In this way, switching from the native http_archive rule to the skylark one literally is only adding load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") Change-Id: I0d3a16ad9ab046b975ea64c97dd201e7a9d70a6a PiperOrigin-RevId: 186285020
* Route fdo logic that deals with the path to the fdo profile through ↵Gravatar Googler2018-02-20
| | | | | | | | | | CcToolchainProvider As --fdo_optimize can point to a label, the path to the fdo profile can not be reliably determined in CppConfiguration. In order to enable the fdo features (which depend on the path to the fdo profile), the logic from CppConfiguration.configurationEnabledFeatures() has been moved to CcCommon.configureFeatures(). The latter method has access to the fdo profile path through CcToolchainProvider. RELNOTES: None. PiperOrigin-RevId: 186278311
* External repositories: document legitimate path assumptionsGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | | | | | | | | | | | | | Add a series of tests verifying the assumptions about execroot layout a user or rule author may rely on. This serves a double purpose: one the one hand, we verify that these legitimate assumptions stay stable, on the other hand, we document what assumptions may be made with the implicit understanding that anything not asserted may change in the future without warning. This patch brings the first set of legitimate assumptions, those about path that may unconditionally be used. - Each target may refer to true source files in its own repository via paths relative to its repository root. - A library can be #inlcude'd via path relative to the root of the repository it resides in. In a follow-up patch, the legitimate assumptions about the portability of paths obtained from Skylark will be documented. Change-Id: I6d91fa4e6e3e2e8040a778fe07425bdd8532b94b PiperOrigin-RevId: 186272067
* runfiles,test: prepare for cc runfiles libraryGravatar Laszlo Csomor2018-02-20
| | | | | | | | | | | Refactor the runfiles library tests so adding the upcoming C++ runfiles library's tests will be easy. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Ib52a0ae1f20cc870fa1d45a15644ae1666600be2 PiperOrigin-RevId: 186268961
* Automated rollback of commit cce164aed44aba1de244f0d764cd33a5cc6980b2.Gravatar fwe2018-02-19
| | | | PiperOrigin-RevId: 186211672
* Rename NativeLibsZipsInfo to AndroidNativeLibsInfo.Gravatar Googler2018-02-16
| | | | | | | | | Expose AndroidNativeLibsInfo constructor to Skylark. Marked as undocumented, since this provider will we replaced with a provider implemented in Skylark once all rules are migrated. RELNOTES: None PiperOrigin-RevId: 186072410
* add flag to use incremental dexing by default for proguarded android binariesGravatar kmb2018-02-16
| | | | | | RELNOTES: None. PiperOrigin-RevId: 186067158