aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Don't keep packages in the default repository around after loading.Gravatar Brian Silverman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this would get thrown when referring to the same package from both the main and default repositories: java.lang.IllegalArgumentException: Multiple entries with same key: tools/cpp=/home/brian/971-Robot-Code and tools/cpp=/home/brian/971-Robot-Code at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136) at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98) at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295) at com.google.devtools.build.lib.buildtool.BuildTool.transformPackageRoots(BuildTool.java:301) at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:209) at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:334) at com.google.devtools.build.lib.runtime.commands.TestCommand.doTest(TestCommand.java:119) at com.google.devtools.build.lib.runtime.commands.TestCommand.exec(TestCommand.java:104) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371) at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016) at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65) at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434) at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229) at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975) at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772) at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55) And this would get thrown for any packages in the main repository loaded from other repositories: java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@//tools/build_rules/go/toolchain' (requested by nodes ) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Invalid BUILD file name for package '@//tools/build_rules/go/toolchain': /home/brian/bazel/tools/build_rules/go/toolchain/BUILD at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:299) at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1308) at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:501) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933) ... 4 more Sponsor's comment: note the abundance of new Label.resolveRepositoryRelative() calls. They are ugly, but it's only making existing ugliness explicit. Yes, we should fix it, especially in the implementation of configurable attributes. Refs #940 -- Change-Id: I8bd7f7b00bec58a7157507595421bc50c81b404c Reviewed-on: https://bazel-review.googlesource.com/#/c/2591 MOS_MIGRATED_REVID=117429733
* Compile base classpaths for Bazel Jack support in android_sdk.Gravatar Michael Staib2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | This also enables Jack support to compile with the Java bootclasspath when running over non-Android rules. This is akin to how normal javac support works - android_ rules are compiled with android.jar, while java_libraries are compiled with special flags but the normal compile time bootclasspath. As of this change, the android_jack attribute on android_sdk is now deprecated, and has no further effect. Because it was always optional, this isn't really much of a change, it just means that now it does nothing even if you DO specify it. Because Jack support is still experimental, this should have no effect on most users. RELNOTES[INC]: android_sdk now compiles android_jack on the fly from android_jar, which means android_jar must be a jar and android_jack is now deprecated. The Jack tools (jack, jill, resource_extractor) must be specified. -- MOS_MIGRATED_REVID=117386373
* sandbox:Gravatar Yue Gan2016-03-17
| | | | | | | | | | | | - add flag --sandbox_add_path, which takes a list of additional paths as argument and mount these paths to sandbox. Fixes #884. - mount target of /etc/resolv.conf if it is a symlink. Fixes #738. RELNOTES: - add flag --sandbox_add_path, which takes a list of additional paths as argument and mount these paths to sandbox. - mount target of /etc/resolv.conf if it is a symlink. -- MOS_MIGRATED_REVID=117364211
* Add content encoding detection for downloaderGravatar Kristina Chodorow2016-03-17
| | | | | -- MOS_MIGRATED_REVID=117340875
* Add Python protobuf to Bazel third_party and move all protobuf targets intoGravatar David Chen2016-03-17
| | | | | | | //third_party/protobuf. -- MOS_MIGRATED_REVID=117336377
* Rename getGeneratingAction (which returns a SpawnAction) to ↵Gravatar Carmi Grushko2016-03-17
| | | | | | | getGeneratingSpawnAction. -- MOS_MIGRATED_REVID=117290280
* Expose feature list in SkylarkRuleContext.Gravatar Dmitry Lomov2016-03-17
| | | | | -- MOS_MIGRATED_REVID=117277091
* Separate download library so it can be reused by generate_workspaceGravatar Kristina Chodorow2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117268295
* Update the java_langtools flag to default to @bazel_tools//tools/jdk:langtools.Gravatar Luis Fernando Pino Duque2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117238298
* Adds bazel_version to the native module for workspace macros.Gravatar Damien Martin-Guillerez2016-03-15
| | | | | | | | | | | | | | | | | | | | | One can now invoke native.bazel_version to get the version of Bazel from the WORKSPACE file. This can be used to do version check, for instance: version.bzl: def check_version(x): if native.bazel_version < x: fail("Current Bazel version is {}, expected at least {}".format(native.bazel_version, x)) WORKSPACE: load("//:version.bzl", "check_bersion") check_version("0.2") Fixes #1014. -- MOS_MIGRATED_REVID=117231557
* Add an integration test for --experimental_uiGravatar Klaus Aehlig2016-03-15
| | | | | | | | | | | | | | | | Add end-to-end tests for very basic properties of the new experimental UI. - At some point during a successful build, we should see an N / M actions progress bar status indicator. - Curses are used to erase some lines. - On a successful test, PASS is written in green. - On a failed test, FAIL is written in red bold. -- Change-Id: I0130017949330882ca6b33552cd288286a4f5b6f Reviewed-on: https://bazel-review.googlesource.com/#/c/3080 MOS_MIGRATED_REVID=117230615
* Incremental dexing for sharded android_binary targetsGravatar Googler2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117186609
* Add semantic tests for ExperimentalStateTrackerGravatar Klaus Aehlig2016-03-14
| | | | | | | | | | | | | | | | | | | | | | | Now that the experimental UI has the first properties we want to keep in the long run, add a test asserting the following semantic properties. - Whenever only one action is running, it is shown somehow in the progress bar. - Completed actions should not be shown in the progress bar. - The earliest-started still running action should be visible in the progress bar. While there, also drop the assumption in the ExperimentalStateTracker that the ExecutionProgressReceiverAvailableEvent has to come before any actions that has not been finished yet. -- Change-Id: Ica52eb12546703e4f8f9d9c64928208621d19ced Reviewed-on: https://bazel-review.googlesource.com/#/c/3048 MOS_MIGRATED_REVID=117121300
* Use repository_ctx for each usage of repository context.Gravatar Damien Martin-Guillerez2016-03-14
| | | | | | | | This will avoid confusion with the normal Skylark rule context. Also fixed indentation of cc_configure.bzl -- MOS_MIGRATED_REVID=117011107
* Add repository_ctx.name to get the name of the repositoryGravatar Damien Martin-Guillerez2016-03-14
| | | | | | | Fixes #1030. -- MOS_MIGRATED_REVID=117009021
* Cleanup AbstractQueueVisitorTest, simpleCounter in particularGravatar Mark Schaller2016-03-11
| | | | | | | | | | | | | | Second in a sequence of CLs to deflake #simpleCounter. The condition, commented out in a previous CL, was checking a property that wasn't deterministic. The maxRunningConcurrently could be either one or two depending on how quickly the AbstractQueueVisitor scheduled the runnables. Also added documentation to a confusing constructor call and removed dead code. -- MOS_MIGRATED_REVID=116995523
* Enforce the current ordering semantics for GlobFunction. These semantics areGravatar Janak Ramakrishnan2016-03-11
| | | | | | | | | fairly arbitrary, so future modifiers of GlobFunction can change the order if they need to, but enforcing the order prevents non-determinism from accidentally creeping in. -- MOS_MIGRATED_REVID=116986512
* Skylark repositories: added path.readdir() to list a directoryGravatar Damien Martin-Guillerez2016-03-11
| | | | | | | | | Also added correct equals and hash for the SkylarkPath class. Fixes #1015. -- MOS_MIGRATED_REVID=116979400
* Expose runfiles symlink functionality in SkylarkGravatar Googler2016-03-11
| | | | | | | | | | | | | | | | | | | | | The Skylark rule context object has a runfiles method. This adds two optional parameters to that method, "symlinks" and "root_symlinks", that expose functionality from the underlying Runfiles java class. With this functionality, one can construct links in the runfiles tree where the source and destination of the link have different names and/or relative directories. This might be useful for things like AppEngine rules where a file in a subdirectory of the source tree needs to appear in the root directory of the runfiles tree. If either new parameter is used, the runfiles is subject to stricter validity checking. This checking propagates to other runfiles that depend on it. RELNOTES: Added "root_symlinks" and "symlinks" parameters to Skylark runfiles() method. -- MOS_MIGRATED_REVID=116879064
* Make the bazel_worker_test non-flaky, once and for all.Gravatar Philipp Wollermann2016-03-10
| | | | | -- MOS_MIGRATED_REVID=116801400
* Quick fix for AbstractQueueVisitorTest.simpleCounter test flakeGravatar Mark Schaller2016-03-09
| | | | | | | | First in a (probably short) sequence of commits to fix the flakiness of the #simpleCounter test. -- MOS_MIGRATED_REVID=116701149
* Skylark: improved documentation and error messages of getattr() and ↵Gravatar Florian Weikert2016-03-08
| | | | | | | | | hasattr() when being called with the name of an existing method. While hasattr(obj, 'existing method') continues to return true, getattr(obj, 'existing method') always throws an exception (with a more detailed message than before), regardless of whether a default value was specified or not. -- MOS_MIGRATED_REVID=116613716
* Allow custom RuleDefinitions in PackageLoadingTestCase.Gravatar Googler2016-03-08
| | | | | | | | This enables certain tests for rules that are not implemented in the core tool, e.g. for Skylark tests. -- MOS_MIGRATED_REVID=116600082
* Detect and warn about runfiles conflicts.Gravatar Googler2016-03-08
| | | | | | | | | A runfile conflict is when two different artifacts have been added to a Runfiles object under the same relative path. Conflict resolution is unchanged (last artifact wins). -- MOS_MIGRATED_REVID=116584195
* Adds ResourceShrinkerAction to android_binary targets if they use Proguard ↵Gravatar Andrew Pellegrini2016-03-08
| | | | | | | | | and specify --experimental_android_resource_shrinking on the command line. RELNOTES: Specifying --experimental_android_resource_shrinking on the command line will enable a resource shrinking pass on android_binary targets that already use Proguard. -- MOS_MIGRATED_REVID=116572863
* Add unsetComputedValue method to GraphTesterGravatar Mark Schaller2016-03-08
| | | | | | | Useful for manipulating computed value nodes in tests. -- MOS_MIGRATED_REVID=116555900
* Skylark: implement dict.updateGravatar Laurent Le Brun2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116553978
* Support android_resources in Android Studio.Gravatar Googler2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116549753
* Add comments to intellij_info Skylark aspect.Gravatar Dmitry Lomov2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116421348
* Clean up some testing code: don't have following tests fail from the ↵Gravatar Janak Ramakrishnan2016-03-08
| | | | | | | TrackingAwaiter if one test fails, and make the Preconditions check in GraphTester a bit more informative. -- MOS_MIGRATED_REVID=116391607
* Correctly report stderr content for repository_ctx.executeGravatar Damien Martin-Guillerez2016-03-04
| | | | | | | | | The shell.Command class throw an exception when exit code is non null, resulting in unwanted case where calling a failing command as just echoing "Exited with status 4". -- MOS_MIGRATED_REVID=116361594
* Allow AbstractQueueVisitor implementations to introspect on active worker ↵Gravatar Eric Fellheimer2016-03-04
| | | | | | | count and possibly use that value to make dynamic decisions around scheduling. -- MOS_MIGRATED_REVID=116351222
* RELNOTES: Set --legacy_bazel_java_test to off by default.Gravatar Damien Martin-Guillerez2016-03-04
| | | | | -- MOS_MIGRATED_REVID=116272974
* Rollback of commit b8101f57681f292a9ec312a9cbbc84ac4ec0668d.Gravatar Dmitry Lomov2016-03-04
| | | | | | | | | | | | | *** Reason for rollback *** Broke depot: [] *** Original change description *** Skylark aspects should always output to bin directory. -- MOS_MIGRATED_REVID=116264598
* Add types to implicit generics for JDK 7Gravatar Kristina Chodorow2016-03-03
| | | | | | | | Using <> is causing the tests not to build, see http://ci.bazel.io/job/Bazel/387/. -- MOS_MIGRATED_REVID=116254679
* Canonicalize the name of the target itself for java indirect dep errors.Gravatar Brian Silverman2016-03-03
| | | | | | | | | | | | | | | Roll-forward of I3762e6be911b79a133a2959fce3a8bf34d183232 with fixes. Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. Second try with the new test disabled for jdk7 because that uses an old, fixed version of the code. -- Change-Id: I7e16fa874066e1b63064662df42a98784fcae233 Reviewed-on: https://bazel-review.googlesource.com/#/c/3032/ MOS_MIGRATED_REVID=116248259
* Python provider is now available in SkylarkGravatar Yun Peng2016-03-03
| | | | | | | | | | | | | Using mandatoryProvidersList to validate python rules' dependency. Added a SkylarkProvider named 'py' which is a SkylarkClassObject in Java and a struct in Skylark. Native python rule and Skylark python rule should have this provider so that they can depend on each other. RELNOTES[NEW]: Native python rule can depend on skylark rule as long as skylark rule provides 'py' provider. -- MOS_MIGRATED_REVID=116241504
* Use static creation method for SkyKey. This allows interning SkyKeys as they ↵Gravatar Janak Ramakrishnan2016-03-03
| | | | | | | are created, as opposed to when they are requested from the ParallelEvaluator. That delay can lead to large memory spikes and churn. -- MOS_MIGRATED_REVID=116224565
* Rollback of commit 37059e4ffd23fbc10828f61ab198b98c2ca7a8a9.Gravatar Kristina Chodorow2016-03-02
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks on Java 1.7 See http://ci.bazel.io/job/Bazel/385/. *** Original change description *** Canonicalize the name of the target itself for java indirect dep errors. Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. -- MOS_MIGRATED_REVID=116164887
* Global cleanup change.Gravatar Googler2016-03-02
| | | | | -- MOS_MIGRATED_REVID=116138214
* Canonicalize the name of the target itself for java indirect dep errors.Gravatar Brian Silverman2016-03-02
| | | | | | | | | | Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. -- Change-Id: I3762e6be911b79a133a2959fce3a8bf34d183232 Reviewed-on: https://bazel-review.googlesource.com/#/c/2782/ MOS_MIGRATED_REVID=116128663
* Expose artifact owner label to Skylark.Gravatar Dmitry Lomov2016-03-02
| | | | | -- MOS_MIGRATED_REVID=116076100
* Clean up absolutize and make it public for use in a subsequent change.Gravatar Nathan Harmata2016-03-02
| | | | | -- MOS_MIGRATED_REVID=116058328
* Always trim the BuildOptions; we've resolved the LIPO issue.Gravatar Ulf Adams2016-03-02
| | | | | | | | The only input to FdoSupport.prepareToBuild is now the exec root, and changes to that invalidate the entire server anyway. -- MOS_MIGRATED_REVID=116027192
* Use two configurations for AspectKeys.Gravatar Michael Staib2016-03-01
| | | | | | | | | | | | In order for Aspects to support dynamic configuration, they need to have two configurations: one to instantiate the Aspect with, containing all the fragment dependencies of the Aspect itself, and one to create the ConfiguredTargetValue.key with, containing only the dependencies of the Rule. This expands AspectKey to have a second configuration, although it currently does not populate that key with anything different. -- MOS_MIGRATED_REVID=115997454
* Add support for additional edge cases to RuleLinkExpander.Gravatar David Chen2016-03-01
| | | | | | | | | | * Add support for rules with capital letters, such as Fileset * Add support for static page headings with periods. * Run the expander on the HTML doc for the name attribute. * Add functions to initial rule index. -- MOS_MIGRATED_REVID=115925884
* Add some additional JSON string escapes.Gravatar Erik Abair2016-03-01
| | | | | -- MOS_MIGRATED_REVID=115921810
* Add JSON conversion for Skylark structs.Gravatar Erik Abair2016-03-01
| | | | | | | | | | This change adds a to_json method on Skylark structs, paralleling the existing to_proto built-in. RELNOTES[NEW]: Adds a to_json method to Skylark structs, providing conversion to JSON format. -- MOS_MIGRATED_REVID=115873229
* Fix go example test to refer to remote reposGravatar Kristina Chodorow2016-02-29
| | | | | | | Another part of #976. -- MOS_MIGRATED_REVID=115859513
* Fix problems with retrieving external deps behind a proxyGravatar Derek Lawless2016-02-29
| | | | | | | | Fixes #587 by properly setting up the Proxy object for HttpDownloader and by setting JVM arguments for GitCloner. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/795 MOS_MIGRATED_REVID=115857070