aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Add an algorithm to reduce aspect paths according to aspects' visibility to ↵Gravatar Dmitry Lomov2017-02-14
| | | | | | | | | | | | each other. Aspects negotiate their visibility by advertizing and requiring providers. The algorithm is not used yet (that is future work). -- PiperOrigin-RevId: 147354682 MOS_MIGRATED_REVID=147354682
* Fix IllegalStateException when loading from a non declared external repository Gravatar Damien Martin-Guillerez2017-02-14
| | | | | | | | | | | This is another instance of #1793 that happens when a WORKSPACE file exists in some path underneath your current workspace. -- Change-Id: Idb01cd643548a170a27c9103f1b5081b058cc005 Reviewed-on: https://cr.bazel.build/8143 PiperOrigin-RevId: 147353935 MOS_MIGRATED_REVID=147353935
* Allow Skylark aspects to advertise providers.Gravatar Dmitry Lomov2017-02-14
| | | | | | -- PiperOrigin-RevId: 147350507 MOS_MIGRATED_REVID=147350507
* Add environ attribute to repository_rule Gravatar Damien Martin-Guillerez2017-02-14
| | | | | | | | | | | | | | | | | | | This environ attribute let the repository rule implementor describes on which environment variable change a repository should be refetched. RELNOTES[NEW]: environ parameter to the repository_rule function let defines a list of environment variables for which a change of value will trigger a repository refetching. Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 3 & 4] Fixes #1595. -- Change-Id: Ibc2f93e69cb08baf86107cc9a9428b7a0eba1bac Reviewed-on: https://cr.bazel.build/8139 PiperOrigin-RevId: 147345203 MOS_MIGRATED_REVID=147345203
* Rollback of commit 3bed84ff177c7cbfd0c8d315829cc9dcb35fcf70.Gravatar Dmitry Lomov2017-02-13
| | | | | | | | | | | | | | | | *** Reason for rollback *** This breaks Bazel CI: http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/556/console *** Original change description *** Make android_sdk_repository fail if api_level requested is not installed. This could have prevented https://github.com/bazelbuild/bazel/issues/2500. -- PiperOrigin-RevId: 147338519 MOS_MIGRATED_REVID=147338519
* Rollback of commit 48e7fe262aacd6602331435e22247ced260c87ec.Gravatar Dmitry Lomov2017-02-13
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks "classpath from classpath.jar" https://github.com/bazelbuild/bazel/issues/2527 Fixes #2257. *** Original change description *** Search for Test classes within the classpath used by the current classloader, instead of the system classpath. -- PiperOrigin-RevId: 147328429 MOS_MIGRATED_REVID=147328429
* Make android_sdk_repository fail if api_level requested is not installed.Gravatar Adam Michael2017-02-13
| | | | | | | | This could have prevented https://github.com/bazelbuild/bazel/issues/2500. -- PiperOrigin-RevId: 147182987 MOS_MIGRATED_REVID=147182987
* Refactoring: Types report what class of labels they contain.Gravatar Michael Staib2017-02-13
| | | | | | | | | | | | | | | | | | | Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do exotic things based on the type. But most sites can avoid having to enumerate all the types they work with explicitly. This causes LABEL_DICT_UNARY to start being treated like the other label types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule need to include a set of allowed file types (none, in their case). -- PiperOrigin-RevId: 147175424 MOS_MIGRATED_REVID=147175424
* Introduce CppCompileActionTemplate, which expands into a list of ↵Gravatar Rumou Duan2017-02-10
| | | | | | | | CppCompileActions that to be executed at execution time. -- PiperOrigin-RevId: 147163077 MOS_MIGRATED_REVID=147163077
* Move the JUnit runner tests to the same location as the Internal Repo.Gravatar Kush Chakraborty2017-02-10
| | | | | | -- PiperOrigin-RevId: 147159416 MOS_MIGRATED_REVID=147159416
* Fixed java_stub_template substitution: %runfiles_manifest_only% was not ↵Gravatar Yun Peng2017-02-10
| | | | | | | | | | substituted when runfiles is enabled. This caused wrong rlocation function being defined on Linux and Mac. -- PiperOrigin-RevId: 147154028 MOS_MIGRATED_REVID=147154028
* BEP: Provide more useful data in TestResult events Gravatar Klaus Aehlig2017-02-10
| | | | | | | | | | | | | | | | | | | | | For individual test actions, more useful data can be provided than just the success status. Do so. Also, to keep each log reported only once, send a new TestAttempt event for the final test attempt, but don't have the TestResult (which contains to union of all test files) an instance of the BuildEvent. As we now report test results in a separate object, drop the test data and directly pass in the files created. In this way, we also get all the moved files reported correctly in the individual attempts. -- Change-Id: Ic04b7bad4f92a381bd4d1b4ec91f743b89f81f84 Reviewed-on: https://cr.bazel.build/8694 PiperOrigin-RevId: 147149025 MOS_MIGRATED_REVID=147149025
* Fix building python zip when middleman runfile is used Gravatar Yun Peng2017-02-10
| | | | | | | | | | | | | | When adding a binary A into data attribute of a py_bianry B, a middleman runfile is used to ensure B's runfiles includes A's runfiles. But this middlman runfile is not really created, so it should not be zipped. Fixed: https://github.com/bazelbuild/bazel/issues/2088 -- Change-Id: Id1a99c66cd8027e945883cf4367f003bccd73473 Reviewed-on: https://cr.bazel.build/8772 PiperOrigin-RevId: 147137055 MOS_MIGRATED_REVID=147137055
* Bazel client, Windows, tests: `rm -rf TEST_TMPDIR`Gravatar Laszlo Csomor2017-02-10
| | | | | | | | | | | | Add test helpers to recursively delete the TEST_TMPDIR in the TearDown method of tests, to ensure each test sees a fresh temp directory. Also add tests for these test helpers. -- PiperOrigin-RevId: 147135561 MOS_MIGRATED_REVID=147135561
* Open source java 8 desugarer.Gravatar Adam Michael2017-02-10
| | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2222. RELNOTES: Support for Java 8 lambdas, method references, type annotations and repeated annotations in Android builds with --experimental_desugar_for_android. -- PiperOrigin-RevId: 147109786 MOS_MIGRATED_REVID=147109786
* Remove unused dep from android_integration_test and clarify comment about ↵Gravatar Adam Michael2017-02-10
| | | | | | | | this mess that we have gotten ourselves into. -- PiperOrigin-RevId: 147097283 MOS_MIGRATED_REVID=147097283
* Make aar_import fail fast if no android_sdk is set up.Gravatar Adam Michael2017-02-10
| | | | | | | | https://github.com/bazelbuild/bazel/issues/2500 -- PiperOrigin-RevId: 147089163 MOS_MIGRATED_REVID=147089163
* --Gravatar Carmi Grushko2017-02-10
| | | | | PiperOrigin-RevId: 147080281 MOS_MIGRATED_REVID=147080281
* Use //third_party/protobuf:protobuf_java instead of ↵Gravatar Carmi Grushko2017-02-09
| | | | | | | | | | | | //third_party/protobuf:protobuf to refer to the Java proto runtime. (second attempt) This is the name in the upstream protobuf repo. -- PiperOrigin-RevId: 147057949 MOS_MIGRATED_REVID=147057949
* Search for Test classes within the classpath used by the current ↵Gravatar Kush Chakraborty2017-02-09
| | | | | | | | classloader, instead of the system classpath. -- PiperOrigin-RevId: 147045814 MOS_MIGRATED_REVID=147045814
* Add bootstrapping test to CI Gravatar Damien Martin-Guillerez2017-02-09
| | | | | | | | | | | Put it only as JDK-8, the generation of the distribution artifact is incorrect with JAVA_VERSION=1.8 -- Change-Id: I87a5f8ec4b12d3aa22a3360fcb9d488757e79461 Reviewed-on: https://cr.bazel.build/8575 PiperOrigin-RevId: 147037944 MOS_MIGRATED_REVID=147037944
* Fix int*list binary operator.Gravatar Laurent Le Brun2017-02-09
| | | | | | | | [2] * 3 should return [2, 2, 2] and not [2, 2, 2, 2]. -- PiperOrigin-RevId: 147017581 MOS_MIGRATED_REVID=147017581
* Use //third_party/protobuf:protobuf_java instead of ↵Gravatar Carmi Grushko2017-02-09
| | | | | | | | | | //third_party/protobuf:protobuf to refer to the Java proto runtime. This is the name in the upstream protobuf repo. -- PiperOrigin-RevId: 146949832 MOS_MIGRATED_REVID=146949832
* Rollback of commit 602a98cbebeff2ba1c2d8605a9552b2c8f5622ae.Gravatar Googler2017-02-09
| | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with fixes for the incremental tool. *** Original change description *** Automated [] rollback of commit d11d510c571b10787856395709f9ad945ca70bb2. *** Reason for rollback *** -- PiperOrigin-RevId: 146940409 MOS_MIGRATED_REVID=146940409
* --Gravatar Carmi Grushko2017-02-09
| | | | | PiperOrigin-RevId: 146926312 MOS_MIGRATED_REVID=146926312
* Introduce a new SkyValue that merely contains the workspace name. The ↵Gravatar Nathan Harmata2017-02-09
| | | | | | | | | | | | workspace name is needed for package loading, and so splitting out this computation into a separate skyframe node that can be change-pruned gives us better incrementality; previously we'd need to reload all packages on a WORKSPACE file change. N.B. (i) This CL doesn't solve all the other performance issues with //external in Bazel/Blaze since it's still inefficiently used for resolving labels like @foo//bar:baz. (ii) This CL doesn't address the wasteful invalidation + change pruning of all the packages. -- PiperOrigin-RevId: 146925369 MOS_MIGRATED_REVID=146925369
* Stop retrieving CcToolChainProvider statically from hard-coded attribute ↵Gravatar Rumou Duan2017-02-08
| | | | | | | | | | ":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used. This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain". -- PiperOrigin-RevId: 146920294 MOS_MIGRATED_REVID=146920294
* Make bazel test suites fail without a real test, by no longer adding an ↵Gravatar Kush Chakraborty2017-02-08
| | | | | | | | | | | | empty test in the TestSuiteBuilder. The current scenario can be bug-prone since changes to the TestSuiteBuilder code may bypass all tests, and in the absence of test failures, our tests will signal success. RELNOTES: Make it mandatory for Java test suites in bazel codebase, to contain at least one test. -- PiperOrigin-RevId: 146919833 MOS_MIGRATED_REVID=146919833
* Introduce a Skyframe function: ActionEnvironmentFunction Gravatar Damien Martin-Guillerez2017-02-08
| | | | | | | | | | | | | | | | | | ActionEnvironmentFunction returns the list of environment variable with the one overwritten by --action_env being replaced. This let other Skyframe function declares dependency to any value of the environment and being influenced by the --action_env flag. This will be used to declare dependency of remote repositories on environment variables (step 3 of https://bazel.build/designs/2016/10/18/repository-invalidation.html) -- Change-Id: I1ed3fb6f48e8e17d4d64c903fccecb6ed7596350 Reviewed-on: https://cr.bazel.build/7974 PiperOrigin-RevId: 146918603 MOS_MIGRATED_REVID=146918603
* Add a boolean flag to a Feature to specify whether it is enabled by default.Gravatar Googler2017-02-08
| | | | | | | | | This enables us to configure default features for each toolchain without having to hard-code anything in class such as CcCommon. -- PiperOrigin-RevId: 146904287 MOS_MIGRATED_REVID=146904287
* Bazel client: retry moving install base directoryGravatar Laszlo Csomor2017-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | Do not give up immediately if renaming/moving the install base directory fails, wait and retry instead. This is necessary because on Windows the directory we just created and populated with the extracted embedded binaries may still be scanned by the antivirus, so there are open file handles in it so it cannot be renamed. This new logic ensures the AV has enough time to scan all files, close the handles, letting us successfully rename the directory. Fixes the occasional "install base directory cannot be renamed in place" error messages on Windows. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 146899919 MOS_MIGRATED_REVID=146899919
* Rollback of commit d11d510c571b10787856395709f9ad945ca70bb2.Gravatar Alex Humesky2017-02-08
| | | | | | | | *** Reason for rollback *** -- PiperOrigin-RevId: 146820790 MOS_MIGRATED_REVID=146820790
* Move all the resource processing tools into a "busybox".Gravatar Googler2017-02-08
| | | | | | | | | This makes the code simpler as well as reducing the number of targets to build. It also makes testing and profiling different action strategies vastly easier. -- PiperOrigin-RevId: 146812659 MOS_MIGRATED_REVID=146812659
* Allow aspects to adveritise providers they provide.Gravatar Dmitry Lomov2017-02-07
| | | | | | -- PiperOrigin-RevId: 146794883 MOS_MIGRATED_REVID=146794883
* Remove dead code in SkyframeLabelVisitorGravatar Ulf Adams2017-02-07
| | | | | | | | | | Two of the functions are never used, several of the parameter are not used or can be simplified (require callers to convert from Target -> Label). -- PiperOrigin-RevId: 146787380 MOS_MIGRATED_REVID=146787380
* Windows: fix off-by-one errors with MAX_PATHGravatar Laszlo Csomor2017-02-07
| | | | | | | | | | | | | | | | | | In almost every place we compared paths against MAX_PATH, we had it wrong. MAX_PATH is the null-terminated maximum length, so paths exactly MAX_PATH long (not counting the null-terminator) were incorrectly considered short. Also fix the error message in the MSVC python wrapper, because it reported an incorrect path length limit in the warning message. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 146762382 MOS_MIGRATED_REVID=146762382
* Remove some dead codeGravatar Ulf Adams2017-02-07
| | | | | | -- PiperOrigin-RevId: 146755491 MOS_MIGRATED_REVID=146755491
* Parameterize the Java logging formatter class.Gravatar Julio Merino2017-02-06
| | | | | | | | | | Allow subclasses of StartupOptions to override the formatter passed to the Java logging configuration. This is to allow us to override this value internally for Blaze in an attempt to homogenize things. -- PiperOrigin-RevId: 146668430 MOS_MIGRATED_REVID=146668430
* Update GenRule to include the Cpp and Jdk toolchains and properly handleGravatar John Cater2017-02-06
| | | | | | | | expanded make variables. -- PiperOrigin-RevId: 146478427 MOS_MIGRATED_REVID=146478427
* Also report about individual attempts in a test Gravatar Klaus Aehlig2017-02-03
| | | | | | | | | | | For tests known to be flaky, additional attempts are run. Also report about those in the build-event protocol. -- Change-Id: I287b0b78478949abe5e14a9fafb1fd463aba8287 Reviewed-on: https://cr.bazel.build/8570 PiperOrigin-RevId: 146454273 MOS_MIGRATED_REVID=146454273
* Fix SkylarkRepositoryIntegrationTest to remove the dependency on genrule.Gravatar John Cater2017-02-03
| | | | | | | | -- Change-Id: Ic303cafde6339e7771a4c9015bd9875a842562f7 Reviewed-on: https://cr.bazel.build/8630 PiperOrigin-RevId: 146404091 MOS_MIGRATED_REVID=146404091
* Fixing reliance on same order for downloading multiple blobs.Gravatar Ola Rozenfeld2017-02-03
| | | | | | | | RELNOTES: n/a -- PiperOrigin-RevId: 146396318 MOS_MIGRATED_REVID=146396318
* Explicitly add JUnit dependencies to a couple of bazel tests. They are being ↵Gravatar Kush Chakraborty2017-02-03
| | | | | | | | supplied to them only because Bazel's own testRunner also depends on JUnit. -- PiperOrigin-RevId: 146389942 MOS_MIGRATED_REVID=146389942
* Enable strict deps for Skylarkified java_lite_proto_library.Gravatar Irina Iancu2017-02-02
| | | | | | | | Also adding missing tests from JavaLiteProtoLibrary, some annotated with @Ignore until the implementation allows enabling them. -- PiperOrigin-RevId: 146357229 MOS_MIGRATED_REVID=146357229
* Rollback of commit e2239cc61ca170ff9a65e1a94c3344d2b272c9e2.Gravatar Lukacs Berki2017-02-02
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //nlp/pragma/similarities/learners:abe_test : blaze test -c opt //nlp/pragma/similarities/learners:abe_test See [] *** Original change description *** Expose rpath entries as a build variable -- PiperOrigin-RevId: 146347832 MOS_MIGRATED_REVID=146347832
* Also report individual test results via BEP Gravatar Klaus Aehlig2017-02-02
| | | | | | | | | | | | Only having a test summary for each test target is not enough for timely error reporting. Also individual test actions and attempts are of interest. Report those by making TestResult an instance of BuildEvent. -- Change-Id: Iee1c988b6d467ebda8230b9edacbe3b66600c30e Reviewed-on: https://cr.bazel.build/8532 PiperOrigin-RevId: 146342845 MOS_MIGRATED_REVID=146342845
* proto_library: saner descriptor setsGravatar Carmi Grushko2017-02-02
| | | | | | | | | | | | | 1. proto_library exposes a direct descriptor set (built from its 'srcs') and a nested set of transitive descriptor (from all of its dependencies). 2. Alias libraries (=no 'srcs') produce empty files as their descriptor sets. 3. The direct descriptor set depends on the transitive ones, ensuring that building a top-most proto validates all of its dependencies are also valid protos. 4. The wire format of protos allows to concatenate the outputs to get a valid serialized proto that contains all of the descriptor sets in the proto tree. RELNOTES: proto_library: alias libraries produce empty files for descriptor sets. -- PiperOrigin-RevId: 146300520 MOS_MIGRATED_REVID=146300520
* Inject the changes in the client environment for the ClientEnvironmentFunction Gravatar Damien Martin-Guillerez2017-02-02
| | | | | | | | | | | | Using a precomputed values prevent us from being able to depends on any environment variable (or we would invalidate the whole graph each time the environment change, that is each time we run a command). -- Change-Id: If322df4240271d04b9278e1222f936156531580c Reviewed-on: https://cr.bazel.build/8400 PiperOrigin-RevId: 146298592 MOS_MIGRATED_REVID=146298592
* Rollback of commit 932d1abfa34267a9e5abc7441c9e2a081beedd85.Gravatar Adam Michael2017-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes and a test. Previously AndroidSdkRepository required that system-images/ directory exist in the Android SDK. However, it does not exist until you download the first system image. *** Original change description *** Automated [] rollback of commit 06072c557290b97cb2d2e4fd255b647a9208cb5c. *** Reason for rollback *** Broke andriod_sdk_repository on ci.bazel.io See https://github.com/bazelbuild/bazel/issues/2465 *** Original change description *** Make android_sdk_repository discover all system-images directories in the sdk. This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146258003 MOS_MIGRATED_REVID=146258003
* Fix #2018: Can't access localhost in bazel 0.3.2.Gravatar Philipp Wollermann2017-02-01
| | | | | | | | | | | | | | The behavior of the Linux sandbox was changed to not hide the local hostname by default. It is now only hidden when the --sandbox_fake_hostname flag is specified. Also, instead of using the hostname "sandbox" in this case, it now uses "localhost", which fixes the issue of sandboxed processes not being able to resolve their local hostname. RELNOTES: For increased compatibility with environments where UTS namespaces are not available, the Linux sandbox no longer hides the hostname of the local machine by default. Use --sandbox_fake_hostname to re-enable this feature. -- PiperOrigin-RevId: 146244268 MOS_MIGRATED_REVID=146244268