testKit

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix failed userguide sample tests

Some userguide tests don't have property settings files, so the removal of

searchUpwards caused them to fail. This commit fixes this issue.

    • -0
    • +2
    ./gradleRunner/gradleVersion/testKitFunctionalTestSpockGradleDistribution.sample.conf
    • -0
    • +2
    ./gradleRunner/spockQuickstart/testKitFunctionalTestSpock.sample.conf
  1. … 9 more files in changeset.
Add settings to a few more TestKit samples

Updated TestKit samples and tests to define `settings.gradle`

  1. … 6 more files in changeset.
Add missing settings scripts to TestKit samples

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +1
    ./gradleRunner/gradleVersion/settings.gradle
    • -0
    • +1
    ./gradleRunner/junitQuickstart/groovy/settings.gradle
    • -0
    • +1
    ./gradleRunner/spockQuickstart/settings.gradle
include Kotlin DSL sample for chapter test_kit (automaticClasspathInjectionCustomTestSourceSet sample)

Signed-off-by: jnizet <jb@ninja-squad.com>

  1. … 1 more file in changeset.
include Kotlin DSL sample for chapter test_kit (automaticClasspathInjectionQuickstart sample)

Signed-off-by: jnizet <jb@ninja-squad.com>

  1. … 1 more file in changeset.
include Kotlin DSL sample for chapter test_kit (manualClasspathInjection sample)

Signed-off-by: jnizet <jb@ninja-squad.com>

  1. … 5 more files in changeset.
include Kotlin DSL sample for chapter test_kit (junitQuickstart sample)

Signed-off-by: jnizet <jb@ninja-squad.com>

    • -0
    • +19
    ./gradleRunner/junitQuickstart/groovy/build.gradle
    • -0
    • +19
    ./gradleRunner/junitQuickstart/kotlin/build.gradle.kts
  1. … 2 more files in changeset.
Convert user manual to be generated by Asciidoctor only

This change replaces all embedded Docbook syntax from the user manual.

Asciidoctor files are now converted directly to HTML and PDF.

It not only greatly simplifies the user manual generation pipeline, but also it makes it faster.

I did the following for all user manual pages:

- [x] Adjusted links to other manual pages, DSL docs, and Javadocs where necessary.

Fixed a couple dozen broken links at least.

- [x] Convert samples XML from docbook to asciidoctor syntax

- [x] Converted wide tables to a more flexible list-based display

Important contributor differences from now on:

- Users must use a `<file>.adoc#` prefix for all cross-reference links.

This is _required_ to achieve working links in all 3 outputs: multi-page user manual, single-page user manual, and PDF.

- The manual PDF is no longer themed, and no longer has the list of examples links in the TOC.

- File names were changed from camelCased to snake_case to have a crystal clear 1-1 mapping between source to output.

- Section reference verification is now handled by Asciidoctor verbose mode.

- The single-page user manual has the same navigation as the multi-page manual for now.

- [Common Asciidoctor extensions](https://github.com/gradle/dotorg-docs/tree/master/docs-asciidoctor-extensions) are now used by Gradle Guides and the User Manual, however, the the web assets (CSS, JS, etc) are not yet merged.

These extensions are responsible for injecting the navigation and styles.

The header/footer/navigation HTML can now be found under `subprojects/docs/src/main/resources`.

  1. … 391 more files in changeset.
Update Spock Version In Docs And Build Init (#5627)

    • -1
    • +1
    ./gradleRunner/gradleVersion/build.gradle
  1. … 1 more file in changeset.
Externalize samples testing infrastructure

This change replaces UserGuideSamplesRunner with an external library

called sample-check. Sample discovery, execution, and normalization

is delegated to this library, with some custom normalizers remaining

in the Gradle codebase.

Samples output has become co-located with the sample code. Samples tests

must be run with Java 8+.

    • -0
    • +2
    ./gradleRunner/junitQuickstart/testKitDependency.sample.conf
    • -0
    • +2
    ./gradleRunner/manualClasspathInjection/testKitFunctionalTestSpockClassesBuildConfig.sample.conf
  1. … 776 more files in changeset.
Document how to clean build cache between tests

  1. … 1 more file in changeset.
Use own cache directory for testkit sample

The test would fail on the second run, since it would use the Gradle

user home test directory.

Expected value should be first argument in assertEquals

Sample projects should provide root project name as best practice (#3730)

  1. … 238 more files in changeset.
Remove usage of --no-search-upwards and deprecate

  1. … 254 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.
Fix link to other chapter

+review REVIEW-6481

  1. … 1 more file in changeset.
Add documentation for testing cacheable tasks

+review REVIEW-6481

  1. … 1 more file in changeset.
Upgrade Spock to version 1.1-groovy-2.4-rc-3

    • -1
    • +1
    ./gradleRunner/gradleVersion/build.gradle
  1. … 12 more files in changeset.
Use old API methods for task inputs and outputs

Will revert deprecation in next commit.

+review REVIEW-6038

  1. … 38 more files in changeset.
Revert "Temporarily reverting everything since 810f052813ea0835dc7e9d3eb87bca005815db64 for 3.0-milestone-1 release"

This reverts commit 506f8ce9d6dc1a81e8ff10575c512778ca2f382a.

  1. … 199 more files in changeset.
Temporarily reverting everything since 810f052813ea0835dc7e9d3eb87bca005815db64 for 3.0-milestone-1 release

  1. … 199 more files in changeset.
Bind task output files to properties

This change introduces a binding between task properties and output files. Output annotations automatically register property values to the corresponding property name.

The `TaskOutputs` API gained new methods with an `include` prefix that allow more flexible configuration of output properties, including specifying the property name to bind the files to. The old methods have been deprecated.

Properties that were not assigned a property name will be bound to a sequence of pseudo names like `$1`, `$2` etc.

+review REVIEW-6038

  1. … 41 more files in changeset.
Fix tests

Some leftover fixes for integration tests.

+review REVIEW-6038

  1. … 6 more files in changeset.
Reorganized samples

+review REVIEW-5865

    • -0
    • +16
    ./gradleRunner/gradleVersion/build.gradle
    • -0
    • +17
    ./gradleRunner/junitQuickstart/build.gradle
  1. … 24 more files in changeset.
Touch up of user guide

+review REVIEW-5839

    • -16
    • +0
    ./testKitSpockAutomaticClasspath/quickstart/build.gradle
  1. … 1 more file in changeset.
Remove unnecessary Groovy dependency declarations.

+review REVIEW-5839

Add sample to demonstrates use of custom test source set

+review REVIEW-5839

    • -15
    • +0
    ./testKitSpockAutomaticClasspath/build.gradle
    • -0
    • +31
    ./testKitSpockAutomaticClasspath/quickstart/build.gradle
  1. … 2 more files in changeset.
Use standard convention for sample in user guide

+review REVIEW-5839

    • -25
    • +1
    ./testKitSpockAutomaticClasspath/build.gradle
  1. … 1 more file in changeset.