aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/runtime
Commit message (Collapse)AuthorAge
...
* Expose aspect-related information in the extra-action proto that Bazel hands ↵Gravatar Carmi Grushko2016-11-11
| | | | | | | | | to action_listener() rules. RELNOTES: Extra actions now contain aspect-related information. -- MOS_MIGRATED_REVID=138832922
* Migrate ActionOwner to @AutoValue.Gravatar Carmi Grushko2016-11-10
| | | | | -- MOS_MIGRATED_REVID=138680612
* Writes a machine readable representation of BuildEvents to a file (varint ↵Gravatar Eduardo Colaco2016-11-03
| | | | | | | | | | | | | | | | | | | delimited). Adds --experimental_build_event_binary_file option that enables varint delimited proto loggging to the specified file path Adds varint delimited BuildEventStreamTransport and BuildEventStreamerModule Adds BuildEventStreamerModule for configuring and setting up BuildEventStreamer and its associated BuildEventTransports. Adds BuildEventTransportFactory which creates a Set of transports from command options. Moves BuildEventStreamer configuration from BlazeCommandDispatcher and BuildEventStreamerModule -- Change-Id: If71f2b58654879c2509206da47e6d1a846bf397f Reviewed-on: https://bazel-review.googlesource.com/#/c/7010/ MOS_MIGRATED_REVID=138073726
* Enables AllowValues and DisallowValues invocation policy operations to takeGravatar Alex Humesky2016-10-25
| | | | | | | | | a value to use instead of the given flag value if it is disallowed by the policy. This is a generalization of the existing new_default_value behavior to cover any value of the flag, not just the default value if the flag is unset. -- MOS_MIGRATED_REVID=137104944
* Line buffer stderr.Gravatar Lukacs Berki2016-10-05
| | | | | | | Ideally, stdout would be line buffered, too, except that we sometimes pump large amounts of binary data through it, so line buffering would result in performance loss. -- MOS_MIGRATED_REVID=135237450
* Add some type annotations for the benefit of Java 7Gravatar Klaus Aehlig2016-10-05
| | | | | | | -- Change-Id: If2cd06ba19e1035275f30c445a99af7a7c81e1d8 Reviewed-on: https://bazel-review.googlesource.com/#/c/6430 MOS_MIGRATED_REVID=135210119
* Enable Bazel commands to exit at any time.Gravatar Michael Staib2016-10-05
| | | | | | | | | | | | | This is the first step on a journey toward allowing commands to AbruptExit wherever they please, similar to how the user can press Ctrl+C at any time and we (should) bail out as fast as we can. By interrupting the command's main thread, we at least offer the command the ability to see that an error requiring a bail has happened, and it should trigger at potentially more locations, rather than just between phases. -- MOS_MIGRATED_REVID=135152330
* Add a build-event streamer classGravatar Klaus Aehlig2016-10-04
| | | | | | | | | | | | | The BuildEventStreamer will listen for BuildEvents and stream them to the provided transports. It also ensures events are properly chained: for unsolicited events, it will add progress events to chain them and at the end of a build it closes all announced but not produced events as aborted. -- Change-Id: I623b582657573fe1288821c96f084e0ab0bca4d4 Reviewed-on: https://bazel-review.googlesource.com/#/c/6275 MOS_MIGRATED_REVID=134787541
* Move workspace initialization out of BlazeRuntime.Builder.Gravatar Ulf Adams2016-08-10
| | | | | | | Require all callers to call initWorkspace after BlazeRuntime construction. -- MOS_MIGRATED_REVID=129842292
* Split BlazeDirectories into two classes.Gravatar Ulf Adams2016-08-09
| | | | | | | | | | | | | This is done in preparation for allowing multiple workspaces / commands in a single server. That requires changes to the module API, which currently hard-codes a 1:1 correspondence between workspaces and servers. Note how BlazeDirectories exists even when it runs outside a workspace. It's not ideal that the output base is in ServerDirectories, and the BlazeRuntime creation also still requires a BlazeDirectories instance. -- MOS_MIGRATED_REVID=129736613
* ExperimentalStateTracker: make suffix gracefully handle negative lengthGravatar Klaus Aehlig2016-08-02
| | | | | | | | | | | | | | When requested to produce a suffix of a string of a string of a given length, gracefully handle the case where the requested length is negative---simply return the empty string in this case. While there, mark this static method as such; also increase visibility to default as it is generally useful and should be tested as an interface of this class. -- Change-Id: I821966f7ba3828809bc6d000358803c131740ec9 Reviewed-on: https://bazel-review.googlesource.com/#/c/4223 MOS_MIGRATED_REVID=129080284
* Add a ServerBuilder, and use that in the module API.Gravatar Ulf Adams2016-07-07
| | | | | | | This change is similar to a previous change that introduced WorkspaceBuilder. -- MOS_MIGRATED_REVID=126799657
* Move LoggingTerminalWriter out of testGravatar Klaus Aehlig2016-06-27
| | | | | | | | | ...so that it can be used by the main code base. -- Change-Id: Ibf59d74ab1b0cca9bd9406bb76ee6e71189653bf Reviewed-on: https://bazel-review.googlesource.com/#/c/3903 MOS_MIGRATED_REVID=125950656
* Add an option for the number of actions shown in the experimental UIGravatar Klaus Aehlig2016-06-21
| | | | | | | | | | | | | | Currently, the experimental UI always shows the 3 oldest, still running actions. While this seems a reasonable default, some users requested to be able to change the number of actions shown. Hence replace the hard-coded value by a flag. While there, also fix an off-by-one error in deciding when to put the ellipsis symbol. -- Change-Id: I037d208360fa1d3f100c99ab1ab1f5fc140138ac Reviewed-on: https://bazel-review.googlesource.com/#/c/3811 MOS_MIGRATED_REVID=125427168
* experimental UI: also report the strategy of running actionsGravatar Klaus Aehlig2016-06-20
| | | | | | | | | | In the experimental UI, for the running actions also report their strategy. This will give a more complete picture of what Bazel is currently doing. -- Change-Id: I9553c952ed494e0db225b2a1ae5e8eba00f68617 Reviewed-on: https://bazel-review.googlesource.com/#/c/3820 MOS_MIGRATED_REVID=125162808
* experimental UI: when showing the last test, color-code its stateGravatar Klaus Aehlig2016-06-03
| | | | | | | | | | | The experimental UI also keeps track, in the progress bar, of the last test that completed. When using curses, use colors to indicate whether the test passed or not. -- Change-Id: Iaa01a773c3bbf534692ed21dd420596cb63e2585 Reviewed-on: https://bazel-review.googlesource.com/#/c/3752 MOS_MIGRATED_REVID=123871492
* Replace Constants.PRODUCT_NAME with a startup option --product_name=bazel and Gravatar Luis Fernando Pino Duque2016-05-31
| | | | | | | | | | | (finally) delete Constants.java. For bazel the file Constants.java is the only source of src/main/java/com/google/devtools/build/lib:common and since it was exporting guava then many dependencies needed to be fixed. -- MOS_MIGRATED_REVID=123648270
* experimental UI: track touched packages during loading/analysisGravatar Klaus Aehlig2016-05-30
| | | | | | | | | | | | | | To give a better understanding of which packages are on the critical path during loading and analysis, provide information in the same way as during execution: show the earliest started, but not yet completed package. As not all packages looked at during the analysis phase are reported to the progress receiver, use a custom class to aggregate those data. -- Change-Id: I03c25efdecb4124e1bc06fce8be9175dc56b5500 Reviewed-on: https://bazel-review.googlesource.com/#/c/3700 MOS_MIGRATED_REVID=123408689
* experimental UI: group test actions by labelGravatar Klaus Aehlig2016-05-25
| | | | | | | | | | | When reporting about actions that are still running, groups those belonging to the same test. In this way, more useful information can be presented in the progress bar, instead of wasting a whole line for a single shard. -- Change-Id: Id1f5a0595767906d6a75f6533be54f3c262ddd67 Reviewed-on: https://bazel-review.googlesource.com/#/c/3646 MOS_MIGRATED_REVID=123097744
* Replace the occurrences of Constants.PRODUCT_NAME for a call toGravatar Luis Fernando Pino Duque2016-05-23
| | | | | | | | | BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests. This CL prepares the codebase in order to delete the constant. -- MOS_MIGRATED_REVID=122993568
* experimental UI: improve message shorteningGravatar Klaus Aehlig2016-05-20
| | | | | | | | | | | | | | | | | When a progress message has to be shortened, as it does not fit in a line in the progress bar, add a new first attempt: if the message the path implicit to the label, only shorten that path within the message (if that gets short enough, leaving a reasonable part of the path); usually, the additional information is more useful than having a longer part of the path present. While there, also fix incorrect length computation in a different case of message shortening. -- Change-Id: Ied80e03cace1b249fc0f4e11bce41f2b4207b6ad Reviewed-on: https://bazel-review.googlesource.com/#/c/3670 MOS_MIGRATED_REVID=122818198
* Fix OptionsParserImpl.clearValue (and invocation policy by extension) to workGravatar Alex Humesky2016-05-10
| | | | | | | correctly with flags that have expansion flags or implicit requirements. -- MOS_MIGRATED_REVID=121862297
* Adds the option to invocation policy SetValue operation to append to repeatedGravatar Alex Humesky2016-05-10
| | | | | | | flags, instead of always replacing all the values. -- MOS_MIGRATED_REVID=121858949
* In InvocationPolicyEnforcer#enforce, instead of just checking the direct ↵Gravatar Janak Ramakrishnan2016-05-02
| | | | | | | | | | | command to see if a flag policy applies, check whether the flag applies by seeing if its list of commands matches one of the commands in the hierarchy. This avoids the tedious and brittle specification of all commands that may use a flag, while providing better filtering out of inapplicable flags. RELNOTES: A FlagPolicy specified via the --invocation_policy flag will now match the current command if any of its commands matches any of the commands the current command inherits from, as opposed to just the current command. -- MOS_MIGRATED_REVID=121159131
* Inject the Constants.TOOLS_REPOSITORY in SkylarkRuleClassFunctions.testBaseRule Gravatar Luis Fernando Pino Duque2016-04-29
| | | | | | | | | | | | | via the Skylark and delete the constant. Also, change the isLoadingPhase in the Skylark environment an enum Phase in order to: - Decide whether testRules are enabled or not and, - Check that the toolsRepository is set when in the LOADING phase. Finally, a few tests that were using ConfiguredRuleClassProvider directly had to be updated to set a tools repository, otherwise createGlobals() fails. -- MOS_MIGRATED_REVID=121022804
* Precompute defaults package content to save ~milliseconds every time ↵Gravatar Janak Ramakrishnan2016-04-28
| | | | | | | | | BlazeRuntime#getDefaultsPackageContent is called. Thanks to nharmata for the suggestion. -- MOS_MIGRATED_REVID=120984951
* Block when another command is running on the server and not on the client ↵Gravatar Lukacs Berki2016-04-20
| | | | | | | when in gRPC mode. -- MOS_MIGRATED_REVID=120233121
* Make ExperimentalStateTracker aim for target widthGravatar Klaus Aehlig2016-04-18
| | | | | | | | | | | | Optionally support a target width for the experimental state tracker; if given, it will try to produce a status bar with lines shorter than that limit, if possible, so that the status bar does not have to be broken. -- Change-Id: Ic5843285300ec10cf3e21b9b7402a6557f6bdb5e Reviewed-on: https://bazel-review.googlesource.com/#/c/3374 MOS_MIGRATED_REVID=119954289
* Move LoggingTerminalWriter to a public util classGravatar Klaus Aehlig2016-04-15
| | | | | | | | | | In this way, it can be used for other tests as well. While there, also unify the two almost identical private LoggingTerminalWriter classes. -- Change-Id: I9cdf9eb235110a0ad6b9514012a92a923d219b53 Reviewed-on: https://bazel-review.googlesource.com/#/c/3372 MOS_MIGRATED_REVID=119943441
* experimental UI: show passed and failed testsGravatar Klaus Aehlig2016-04-14
| | | | | | | | | | | | In the experimental UI, show the most recent finished test in the (long) progress bar. For failed test, immediately write an entry to the scroll-back buffer. In this way, the user can get an already investigate test failures while other tests are still running. -- Change-Id: I5df29dc55b979c8547e99e9ac3f60563736b48e8 Reviewed-on: https://bazel-review.googlesource.com/#/c/3351 MOS_MIGRATED_REVID=119732631
* experimental UI: Keep track of completed testsGravatar Klaus Aehlig2016-04-14
| | | | | | | | | | | When running tests, a useful information to know is the number of tests that have passed and failed already. Hence subscribe to the relevant events and provide this information in the progress bar as well. -- Change-Id: I6fabec3f4585500f096b820dbbd5e8e6897647fa Reviewed-on: https://bazel-review.googlesource.com/#/c/3350 MOS_MIGRATED_REVID=119727962
* ExperimentalStateTracker: add a short version of the progress barGravatar Klaus Aehlig2016-04-11
| | | | | | | | | | | | When bazel is used without curses, every status message ever written will never be deleted and, instead, stick in the log. To keep the output manageable in this case, provide a one-line progress bar to be used in this case. -- Change-Id: Ia0f9619d406e676f88ff536617a56fd4990cb51e Reviewed-on: https://bazel-review.googlesource.com/#/c/3294 MOS_MIGRATED_REVID=119520912
* Fix bug introduced by commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9 where ↵Gravatar Nathan Harmata2016-04-07
| | | | | | | | | | | | | a less specific option specification in a rc file could override a more specific option specification when there's a non-trivial Command hierarchy. A concrete example would be a "build --foo=1" line overriding a "test --foo=2" line for a "test" invocation. See the added test for more details. Also fix some typos in BlazeCommandDispatcherRcoptionsTest.java. Note that commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9 was rolled back in commit 417dad0f1e0d0ed4ccd5f8e52b49eb79937da49d which also incidentally rolled back commit 4f0fbe1b09333806cce76b75214e98c7684766e0. So this change is effectively a roll-forward of both of those, plus the bug fix, plus the typo fixes, and plus a documentation update. -- MOS_MIGRATED_REVID=119276218
* Rollback of commit dc0fbb42ab22ab8f3205b0884069e1ffe03677c9.Gravatar John Field2016-04-07
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Changed the semantics of local .blazerc handling, requiring a Blaze release rollback ([]). *** Original change description *** Make specific options win over common ones When specifying which command names to parse options for, given the command annotation, ensure that "common" comes first, so that it can be overridden by more specific options. -- MOS_MIGRATED_REVID=119227260
* Fix typo in doc stringGravatar Klaus Aehlig2016-04-07
| | | | | | | | | The ExperimentalStateTrackerTest tests the ExperimentalStateTracker, not itself. -- Change-Id: I182558bfa21881ae43e5c72161805c7045290551 Reviewed-on: https://bazel-review.googlesource.com/#/c/3260 MOS_MIGRATED_REVID=119149442
* Add tests documenting the way rc-options are combinedGravatar Klaus Aehlig2016-04-07
| | | | | | | | | | | | | | | | Note that this patch does not change any semantics, it just adds tests. In this way, we have a machine-checkable (hence up to date) documentation of the semantics of how rc options are handled. In particular, our semantics is that - options get collected from all rc files, - more specific options take precedence over less specific ones, and - for equally specific options, the most specific rc file takes precedence. -- Change-Id: I6abadd15eb02a2f952debc3b005668e04dccd62a Reviewed-on: https://bazel-review.googlesource.com/#/c/3241 MOS_MIGRATED_REVID=119083139
* experimental UI: update progress bar on progress eventsGravatar Klaus Aehlig2016-04-05
| | | | | | | | | | | In the experimental UI, use progress events as an occasion to update the progress bar. However, to avoid unnecessary noise, only do so, if the progress bar potentially changes with time. -- Change-Id: I9bee093c29e0eb50e7fcce2fa6e941a02d615def Reviewed-on: https://bazel-review.googlesource.com/#/c/3206 MOS_MIGRATED_REVID=118944208
* experimental UI: show run-time for long-running actions in the progress barGravatar Klaus Aehlig2016-04-04
| | | | | | | | | | | | Currently, the progress bar shows the 3 earliest started still running actions. While this might give some indication about which actions delay the build process, it lacks quantitative information about how long the delay is. By adding the current run time to the progress bar, at least some quantitative information is provided. -- Change-Id: Ib90eda67d87384a4372cda7779a09a44cea2b8dd Reviewed-on: https://bazel-review.googlesource.com/#/c/3205 MOS_MIGRATED_REVID=118933973
* Pass through the clock to the ExperimentalStateTrackerGravatar Klaus Aehlig2016-04-04
| | | | | | | | | | In this way, the ExperimentalStateTracker has access to all the information needed to provide information about the run-time of currently running actions. -- Change-Id: I0f4e48f39e9ebe63555e4bb1d70df2a6dbb65430 Reviewed-on: https://bazel-review.googlesource.com/#/c/3204 MOS_MIGRATED_REVID=118929758
* Always apply invocation policy when constructing build options.Gravatar Janak Ramakrishnan2016-03-24
| | | | | -- MOS_MIGRATED_REVID=117939121
* Make specific options win over common onesGravatar Klaus Aehlig2016-03-23
| | | | | | | | | | | When specifying which command names to parse options for, given the command annotation, ensure that "common" comes first, so that it can be overridden by more specific options. -- Change-Id: I20cd90c098e993580c32297d1e36c8a6c939873a Reviewed-on: https://bazel-review.googlesource.com/#/c/3091 MOS_MIGRATED_REVID=117821257
* Don't print BLAZE_HALTED_BEFORE_TESTING for tests that failed to build ↵Gravatar Janak Ramakrishnan2016-03-21
| | | | | | | | | because we halted. RELNOTES: Tests that failed to build because execution was halted no longer print their status. -- MOS_MIGRATED_REVID=117542221
* 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
* Adds support for invocation policy to the canonicalize-flags command.Gravatar Alex Humesky2016-01-15
| | | | | -- MOS_MIGRATED_REVID=112267123
* Migrated tests in devtools/build/lib/runtime to JUnit 4.Gravatar Florian Weikert2015-12-03
| | | | | -- MOS_MIGRATED_REVID=109307285
* Replace home-made assertions with equivalent Google Truth calls.Gravatar Carmi Grushko2015-11-11
| | | | | -- MOS_MIGRATED_REVID=107492955
* Add timing info for tests and correct caching vs. run ratioGravatar Kristina Chodorow2015-10-13
Now prints: //foo:bar (cached) PASSED in 0.1s instead of: //foo:bar (1/0 cached) PASSED Fixes #218. -- MOS_MIGRATED_REVID=105210302