aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Make __init__.py files creation optionalGravatar Mouad Benchchaoui2018-02-14
| | | | | | | | | | | Introduce a new attribute to py_binary and py_test to control whether to create `__init__.py` or not. Fixes https://github.com/bazelbuild/rules_python/issues/55 Closes #4470. PiperOrigin-RevId: 185672243
* windows,launcher: now picks up RUNFILES_* envvarsGravatar Laszlo Csomor2018-02-14
| | | | | | | | | | | | | | The Windows native {java,py,sh}_binary launcher now picks up the RUNFILES_MANIFEST_FILE and RUNFILES_DIR envvars from the environment. This enables running such binaries even when they are data-dependencies of other binaries and thus have no runfiles (manifest or directory) of their own. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I1bc8e30f81b9932ea7c96ded2717ac9d0600403d PiperOrigin-RevId: 185656004
* Automatic code cleanup.Gravatar cpovirk2018-02-13
| | | | PiperOrigin-RevId: 185624059
* Thread {Des,S}erializationContext through Package serialization interfaceGravatar michajlo2018-02-13
| | | | PiperOrigin-RevId: 185609826
* Add Codec for NativeAspectClass. As a result, remove @AutoCodec from ↵Gravatar janakr2018-02-13
| | | | | | | | concrete subclasses. Improve debugging message on serialization failures. Lot of test-side changes to make sure aspects are properly registered with the RuleClassProvider. PiperOrigin-RevId: 185607202
* Increase timeout on incompatible_changes_conflict_test.Gravatar ruperts2018-02-13
| | | | | RELNOTES: None. PiperOrigin-RevId: 185580415
* Environment guarantees determinism when retrieving its bindingsGravatar brandjon2018-02-13
| | | | | | | Added a little javadoc and tests. RELNOTES: None PiperOrigin-RevId: 185569985
* Fix CROSSTOOL.tpl to correctly target watchos_i386.Gravatar kaipi2018-02-13
| | | | PiperOrigin-RevId: 185556666
* Replaces InjectingObjectCodec with dependencies threaded through ↵Gravatar shahan2018-02-13
| | | | | | (Des|S)erializationContext. PiperOrigin-RevId: 185547740
* Route --fdo_optimize information through an implicit dependency instead of ↵Gravatar Googler2018-02-13
| | | | | | | CppConfiguration RELNOTES: None. PiperOrigin-RevId: 185527875
* tmpdir,local-exec: implement --local_tmp_rootGravatar Laszlo Csomor2018-02-13
| | | | | | | | | | | | | | Add new flag called `--local_tmp_root`, which (if specified) tells Bazel what temp directory should locally executed actions use. Fixes https://github.com/bazelbuild/bazel/issues/4621 Related to https://github.com/bazelbuild/bazel/issues/3215 RELNOTES[NEW]: The new "--local_tmp_root=<path>" flag allows specifying the temp directory for locally executed actions. Change-Id: Ice69a5e63d0bf4d3b5c9ef4dbdd1ed1c5025f85e PiperOrigin-RevId: 185509555
* Automated rollback of commit 28bd997c1c8793973f63dcae4c22bbae49e7d8b7.Gravatar Googler2018-02-12
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** https://github.com/bazelbuild/bazel/issues/4625 What I thought was a short fix is turning into a long hunt, so I better roll this back to get the build green again. I'm not yet 100% certain what the interactions are, but there's a chance that it's back to the drawing board. *** 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=manual scripts and new test case. RELNOTES: None PiperOrigin-RevId: 185482604
* Get rid of some uses of RuleConfiguredTarget.getAttributeMapper().Gravatar mjhalupka2018-02-12
| | | | PiperOrigin-RevId: 185441432
* Create a basic annotation processor for validating SkylarkCallable uses at ↵Gravatar cparsons2018-02-12
| | | | | | | compile time. RELNOTES: None. PiperOrigin-RevId: 185432867
* Make AndroidInstrumentationInfo createable from Skylark.Gravatar ajmichael2018-02-12
| | | | | | | | This enables writing tests for android_instrumentation_test that mock android_binary using a skylark rule that returns an AndroidInstrumentationInfo. RELNOTES: None PiperOrigin-RevId: 185417182
* Fixing test-setup.sh occasionally missing stdout/stderr, on systems where ↵Gravatar Googler2018-02-12
| | | | | | | | | | | | "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=manual scripts and new test case. RELNOTES: None PiperOrigin-RevId: 185374273
* Changes cc_library to consume headers specified in the "hdrs" attribute of anGravatar cpeyser2018-02-12
| | | | | | | | objc_library that it depends on. See https://github.com/bazelbuild/bazel/issues/3352 PiperOrigin-RevId: 185371993
* C++: Allows adding linkopts through file.Gravatar plf2018-02-12
| | | | | | | The file can be generated during execution by a different rule. RELNOTES:none PiperOrigin-RevId: 185361140
* Skylark: SlicingExpression: do not create new nodes for optional expressionsGravatar laurentlb2018-02-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 185353994
* Add context argument to ObjectCodec.{serialize,deserialize}Gravatar michajlo2018-02-11
| | | | | | | | | | Context implementations are currently empty, just doing the plumbing in this change. Once this is in we can start passing along the ObjectCodecRegistry, which will allow runtime codec resolution for classes not known at compile time. We'll also inevitably add some memoization helpers, allowing us to optimize the serialization process further. PiperOrigin-RevId: 185305674
* Add custom_package attribute to android_local_test.Gravatar dannark2018-02-10
| | | | | | | | | android_local_test generates and R.class file and so this is necessary for projects that don't nest their BUILD files under a java/ or javatests/ root. Fixes #4618 RELNOTES: None PiperOrigin-RevId: 185281836
* Increase timeout of build_event_stream_test.Gravatar ruperts2018-02-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 185215175
* Make getxattr not throw an exception when attribute does not exist on Mac.Gravatar ajmichael2018-02-09
| | | | | | | This matches the current behavior on Linux. When an extended attribute is not present on a file, getxattr on Linux returns ENODATA whereas getxattr on Mac returns ENOATTR. Previously, we were special casing ENODATA to not throw an exception but not ENOATTR. Now we treat them the same. RELNOTES: None PiperOrigin-RevId: 185157964
* Make blaze stop passing --rule_kind to java tools.Gravatar tomlu2018-02-09
| | | | | | | This argument is unused and should be removed. RELNOTES: None PiperOrigin-RevId: 185147327
* Move BazelRuleClassProvider.TOOLCHAIN_RULES to its own class.Gravatar lpino2018-02-09
| | | | PiperOrigin-RevId: 185143078
* Java,runfiles,test: test finding runfilesGravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | | | | | Add a test to //src/test/py/bazel:runfiles_test that ensures that Java binaries using the Java runfiles library in @bazel_tools can find their runfiles, even if JAVA_RUNFILES and the RUNFILES_* envvars are undefined. There's already a shell script test for this in //src/test/shell/bazel:java_launcher_test, but we don't run that on Windows, shell tests are slower on Windows than on Linux anyway, and adding this test was very little work. Plus I'll need the new Bar.java file for other tests that are coming. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Ie0fa51046c3f3a1e5ece7a6206131261a5a5b1f8 PiperOrigin-RevId: 185137988
* distdir: also accept relative pathGravatar Klaus Aehlig2018-02-09
| | | | | | | ...and interpret them relative to the workspace directory. Change-Id: I31a0ce3a179356c798f00c4218ddd22e16b256a3 PiperOrigin-RevId: 185136432
* Remove hard-wired basenames for the test setup and the coverage collection ↵Gravatar lberki2018-02-09
| | | | | | | | | script. Accomplished by creating an explicit attribute for both of them on test actions. RELNOTES: None. PiperOrigin-RevId: 185132460
* Simplify BinTools setup for integration testsGravatar ulfjack2018-02-09
| | | | | | Progress on #4608. PiperOrigin-RevId: 185126689
* experimental_repository_cache: support relative pathsGravatar Klaus Aehlig2018-02-09
| | | | | | | | | | ...and interpret them relative to the workspace directory. Improves on #3516. In fact, fixes the original request of supporting relative paths. Change-Id: Ibbb6fd43179d589ad477427e47e26c773c7a04de PiperOrigin-RevId: 185121629
* python,runfiles library,refactor: rename EnvVar()Gravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | Rename the runfiles library's Runfiles.EnvVar() method to EnvVars(), indicating that it may return multiple entries in the dict. In the future this method will return multiple keys, but I want to update the interface ASAP so that it is stable after it's released in Bazel 0.12.0. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I8ab3a2a64736ff746dd96fea80ba2f5356dcfcc3 PiperOrigin-RevId: 185118832
* Support local search for http archivesGravatar Klaus Aehlig2018-02-09
| | | | | | | | | | | | | | | | | | With --experimental_repository_cache, bazel has means of avoiding downloading the same archive again. However, this requires bazel to first download it itself, as we make no guarantee about the internal structure of that cache; this, in turn, does not play well in situations where bazel has to cooperate with other tools, e.g., because the bazel build is just one step in a larger package building process. Therefore, add an experimental option allowing to specify directories where the outer process may have placed needed files and make bazel not download them if a file with correct name and hash could be found in one of those directories. In this way, cooperation is possible without patching all entries in the WORSPACE file. Change-Id: I43240b8b59bf8472ec0310661015899e46491236 PiperOrigin-RevId: 185115713
* Stub default methods as needed for core library desugaringGravatar kmb2018-02-08
| | | | | | RELNOTES: None PiperOrigin-RevId: 185082719
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Remove references to getTarget(). Requires threading through anGravatar mjhalupka2018-02-08
| | | | | | | ExtendedEventHandler so we can get the target via the package manager during rule dumps. PiperOrigin-RevId: 185042522
* remote: Add support for HTTP Basic AuthGravatar Jakob Buchgraber2018-02-08
| | | | | | Closes #4609. PiperOrigin-RevId: 185032751
* Move BazelRuleClassProvider.SH_RULES to its own class.Gravatar lpino2018-02-08
| | | | PiperOrigin-RevId: 185021810
* Adding awaitTermination in our tests tear down.Gravatar olaola2018-02-08
| | | | | | | | | | | This is to prevent this error: SEVERE: *~*~*~ Channel io.grpc.internal.ManagedChannelImpl-56 for target directaddress:///io.grpc.inprocess.InProcessSocketAddress@3ecbfba1 was not shutdown properly!!! ~*~*~* Make sure to call shutdown()/shutdownNow() and awaitTermination(). TESTED=ran tests RELNOTES: None PiperOrigin-RevId: 185020683
* python,runfiles library: don't pick up TEST_SRCDIRGravatar Laszlo Csomor2018-02-08
| | | | | | | | | | | | | | | | | | | | The Python runfiles library will no longer pick up the runfiles directory from $TEST_SRCDIR. This is in accordance with the Java runfiles library, see the motivation in https://github.com/bazelbuild/bazel/issues/4598 The commit also adds a test for this functionality as well as exercising that the runfiles library can find the runfiles directory even if no RUNFILES_* envvars are exported. See https://github.com/bazelbuild/bazel/issues/4598 See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I6e4d154cdca66b29d7c6e77743cf8109638238b5 PiperOrigin-RevId: 185009819
* User-friendlier representation of a missing digest.Gravatar olaola2018-02-08
| | | | | | | | I moved it into DigestUtil preemptively in case we switch to binary instead of hex representation. TESTED=manually RELNOTES: None PiperOrigin-RevId: 185007558
* java,runfiles: fix tests with TEST_SRCDIRGravatar Laszlo Csomor2018-02-08
| | | | | | | | | | | | Update //src/test/py/bazel:runfiles_test to test that the Java (and Python) runfiles libraries do NOT pick up TEST_SRCDIR from their environment. See https://bazel-review.googlesource.com/c/bazel/+/37190 See https://github.com/bazelbuild/bazel/issues/4598 Change-Id: I06eb50c8cb4c93a331e51cd38ebdd7c1bcf38bba PiperOrigin-RevId: 184994372
* Fixing #4585: broken re-execution of orphaned actions.Gravatar olaola2018-02-08
| | | | | | | | This is an important regression, we will want to patch the fix into 0.10 TESTED=fixed unit test, with A/B testing RELNOTES: Resolved an issue where a failure in the remote cache would not trigger local re-execution of an action. PiperOrigin-RevId: 184991670
* Make remaining Apple tests correctly reference tools repository identifierGravatar cparsons2018-02-08
| | | | | RELNOTES: None. PiperOrigin-RevId: 184985081
* Move BazelRuleClassProvider.J2OBJC_RULES to its own class.Gravatar lpino2018-02-08
| | | | PiperOrigin-RevId: 184983111
* Introduce -c source_file -o output_file build variablesGravatar hlopko2018-02-08
| | | | | | | | | | | | | | Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. Encore of https://github.com/bazelbuild/bazel/commit/f26e8694ae78599b3e2004e3360eaf3443fa53a6. RELNOTES: None. PiperOrigin-RevId: 184981106
* Increase timeout on remote_execution_test.Gravatar ruperts2018-02-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 184947081
* Extract registry functionality from ObjectCodecsGravatar michajlo2018-02-07
| | | | | | | | | | This partially solves the age old problem of how to find a codec for a value we don't know the type of at compile time, and allows us to represent such values on the wire more compactly. @AutoCodec's injecting codec should be able to make use of this right away - we'll need to make an API change to the ObjectCodec interface to allow the existing system to make use. PiperOrigin-RevId: 184918173
* Automated rollback of commit e01d0c8f9019b7e0beb406ea3932e7dc84b6f333.Gravatar Googler2018-02-07
| | | | | | | | | | | | | *** Reason for rollback *** Has no effect, since one version violation does not use _deploy.jar/_filtered.jar. *** Original change description *** Filter out generated proto extension registry loader from instrumentation APK. RELNOTES: None PiperOrigin-RevId: 184918011
* Rename generated core classes during core library desugaringGravatar kmb2018-02-07
| | | | | | RELNOTES: None. PiperOrigin-RevId: 184915177
* Hooks to support core library desugaring in Android buildsGravatar kmb2018-02-07
| | | | | | RELNOTES: None. PiperOrigin-RevId: 184909685