Update testLatestDeps doc (#1238)

This commit is contained in:
Trask Stalnaker 2020-09-22 21:37:05 -07:00 committed by GitHub
parent 5cebfeb247
commit b9bbcd85a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 11 deletions

View File

@ -20,17 +20,10 @@ auto-instrumentations using that java version which runs the Gradle build
itself. These tests usually use the minimal supported version of the itself. These tests usually use the minimal supported version of the
instrumented library. instrumented library.
In addition to that each instrumentation has a separate test set called
`latestDepTest`. It was created by [Gradle test sets
plugin](https://github.com/unbroken-dome/gradle-testsets-plugin). It uses the
very same tests as before, but declares a dynamic dependency on the latest
available version of this library. You can run them all by executing
`./gradlew latestDepTest`.
#### Executing tests with specific java version #### Executing tests with specific java version
In order to run tests on a specific java version, just execute `./gradlew In order to run tests on a specific java version, just execute `./gradlew
testJava7` (or `testJava11` or `latestDepTestJava14` etc). Then Gradle task testJava7` (or `testJava11` etc). Then Gradle task
rule will kick in and do the following: rule will kick in and do the following:
- check, if Gradle already runs on a java with required version - check, if Gradle already runs on a java with required version
@ -38,9 +31,12 @@ rule will kick in and do the following:
- if Gradle could not found requested java version, then build will fail - if Gradle could not found requested java version, then build will fail
- Gradle will now find all corresponding test tasks and configure them to use java executable of the requested version. - Gradle will now find all corresponding test tasks and configure them to use java executable of the requested version.
This works both for tasks named `test` and `latestDepTest`. But currently #### Executing tests against the latest versions of libraries under instrumentation
does not work for other custom test tasks, such as those created by test sets
plugin. This is done as part of the nightly build in order to catch when a new version of a library is
released that breaks our instrumentation tests.
To run these tests locally, add `-PtestLatestDeps=true` to your existing `gradlew` command line.
#### Executing single test #### Executing single test