TestListenerBuildOperationAdapterTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Emit build operation progress events for logging output (#4537)

* Tweak BuildOperationListener#progress api

* Use build operation id to reference progress

* Add workaround for tracing log output via build operation progress for composite builds

* Replace some Object typing of operation identifiers with OperationIdentifier.

* Associate all progress logging with the current build operation.

* Update logic to accommodate for all progress events now having build operation IDs.

* Don't allow ProgressStartEvent.buildOperationCategory to be null.

** Default it to uncategorized.

    • -1
    • +1
    ./TestListenerBuildOperationAdapterTest.groovy
  1. … 50 more files in changeset.
Rationalise handling of “current” build operation and build operation ID

For an upcoming change to emit console logging as build operation progress events, we need to associate all progress logging with the build operation. This pulled a thread on some long overdue cleanup.

The end result is:

1. Base build operation infrastructure is consolidated org.gradle.internal.operations.

2. Mechanism for passing thread global current build operation is more test friendly, and better named.

3. A consistent mechanism is used for binding the current operation to the thread, instead of two mechanisms.

4. Build operation IDs are typed to OperationIdentifier.

There is no public API or user behaviour change.

    • -2
    • +2
    ./TestListenerBuildOperationAdapterTest.groovy
  1. … 147 more files in changeset.
Introduce build operation progress events, only used for conveying test output to build scans currently.

    • -8
    • +5
    ./TestListenerBuildOperationAdapterTest.groovy
  1. … 22 more files in changeset.
Move the test build operation classes to a dedicated package.

    • -0
    • +108
    ./TestListenerBuildOperationAdapterTest.groovy
  1. … 12 more files in changeset.