JacocoCachingIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Change more tests.

  1. … 40 more files in changeset.
Change more tests.

  1. … 13 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

  1. … 98 more files in changeset.
Fix Jacoco to work with build cache

Jacoco code coverage should work well with the build cache out of the

box. Since appending to a coverage file works with parallel test

execution, see https://github.com/jacoco/jacoco/pull/52, we set

`append=true` and delete the coverage data just before the test task

starts to execute.

Note that this is a breaking change: separate tasks now cannot use the

same coverage file, since each of the tasks will delete it.

Issue: #5269

  1. … 7 more files in changeset.
Allow enabling build cache in all integration tests

Signed-off-by: Lóránt Pintér <lorant@gradle.com>

  1. … 27 more files in changeset.
Check that cached jacoco report is the same

Activate test which is now implemented

Do not restore file dates when unpacking task outputs (#2667)

  1. … 5 more files in changeset.
Add coverage for Test tasks being cachable with Jacoco disabled

+review REVIEW-6522

    • -0
    • +25
    ./JacocoCachingIntegrationTest.groovy
Add @NotYetImplemented test for JaCoCo's effect on Test

+review REVIEW-6522

    • -0
    • +23
    ./JacocoCachingIntegrationTest.groovy
Revert "Remove check for jacoco.append=true to disable caching"

This reverts commit 0ad7be70ca4661b5fdc56722a9018097b6797389.

+review REVIEW-6522

  1. … 3 more files in changeset.
Keep a good test

+review REVIEW-6524

  1. … 1 more file in changeset.
Detect overlapping files for cacheable tasks

When two tasks overwrite one another, enforcing overlap detection doesn't

really make sense (because the outcome is the same).

But when two tasks append to a single output file, we should disable caching

because the order of the two tasks executing matters more.

+review REVIEW-6522

    • -3
    • +33
    ./JacocoCachingIntegrationTest.groovy
  1. … 3 more files in changeset.
Remove check for jacoco.append=true to disable caching

If two Test tasks use the same JaCoCo execution data file, overlapping

output detection will disable build caching.

+review REVIEW-6522

  1. … 3 more files in changeset.
Extract test fixture for HttpBuildCache

  1. … 21 more files in changeset.
Use separate output directories for all JVM languages

- Introduce an outputDir on SourceDirectorySet

- Default output directory is now `build/classes/<source directory set name>/<source set name>`

- Example: Java compilation goes to build/classes/java/main instead of build/classes/main

- Adapt JDepend, FindBugs, Test and ValidateTaskProperties tasks to handle multiple class directories

- Deprecate setClassesDir/getClassesDir on SourceSetOutput

- Calling setClassesDir restores old behavior (shared output directory)

- Introduce addClassesDir and getClassesDirs on SourceSetOutput

- OSGi plugin needs a single classes directory, so introduce 'osgiClasses' task that syncs all classes to a single directory

Most of the changes to integration tests are find classes in their new location. Helper methods in AbstractIntegrationSpec

can locate class files vs hardcoding a path.

Squashed commit of sg-split-jvm-classes branch for REVIEW-6502

  1. … 119 more files in changeset.
Do not append to Jacoco output in tests

So that the task is cached/can be up-to-date

+review REVIEW-6420

  1. … 2 more files in changeset.
Test Jacoco class dump dir

+review REVIEW-6418

Upgrade JaCoCo library to a Java 9-compatible version

  1. … 5 more files in changeset.
Basic support for enforcing Jacoco metrics

    • -14
    • +4
    ./JacocoCachingIntegrationTest.groovy
  1. … 18 more files in changeset.
Rename LocalTaskCacheFixture to LocalBuildCacheFixture

+review REVIEW-6392

  1. … 14 more files in changeset.
Rename withCache -> withTaskCache

To distinguish the task cache from the many

other caches we have.

+review REVIEW-6338

  1. … 9 more files in changeset.
Make testing the task output cache easier

Instead of relying on subclassing I added a

trait which can be mixed into tests which want

to exercise the cache.

+review REVIEW-6338

  1. … 10 more files in changeset.
Ignore Jacoco tests on Java 9

+review REVIEW-6301

  1. … 2 more files in changeset.
Actually cache Jacoco results

We haven't stored them previously. Now we have an integration test to make sure.

+review REVIEW-6301

    • -0
    • +64
    ./JacocoCachingIntegrationTest.groovy
  1. … 1 more file in changeset.