New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore Previous Test Options Behavior #19080
Changes from 7 commits
9f7c6ba
d520052
ac89b43
f0d4f8f
d8d1b1f
efc24a5
7670525
8ca8551
a153e3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,6 +122,7 @@ public class MyTest { | |
|testing { | ||
| suites { | ||
| test { | ||
| useJUnit() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes to this test are to produce a much cleaner test buildScript, the previous one, captured from a breakpoint for each run in this test, had some misleading and irrelevant duplicated content. |
||
| targets { | ||
| all { | ||
| testTask.configure { | ||
|
@@ -143,7 +144,23 @@ public class MyTest { | |
|
||
when: | ||
resources.maybeCopy("JUnitCategoriesIntegrationSpec/reExecutesWhenPropertyIsChanged") | ||
buildFile << "test.useJUnit()" | ||
buildFile << """ | ||
|testing { | ||
| suites { | ||
| test { | ||
| useJUnit() | ||
| targets { | ||
| all { | ||
| testTask.configure { | ||
| options { | ||
| ${type} 'org.gradle.CategoryB' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|}""".stripMargin() | ||
|
||
and: | ||
succeeds ':test' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,26 @@ class TestNGUpToDateCheckIntegrationTest extends AbstractIntegrationSpec { | |
@Issue('https://github.com/gradle/gradle/issues/4924') | ||
def 'test task is up-to-date when #property is changed because it should not impact output'() { | ||
given: | ||
TestNGCoverage.enableTestNG(buildFile) | ||
buildScript """ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More extraneous info in buildScript cleanup here. |
||
apply plugin: "java" | ||
${mavenCentralRepository()} | ||
testing { | ||
suites { | ||
test { | ||
useTestNG('${TestNGCoverage.NEWEST}') | ||
targets { | ||
all { | ||
testTask.configure { | ||
options { | ||
/* left empty */ | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
""" | ||
|
||
when: | ||
succeeds ':test' | ||
|
@@ -97,7 +116,26 @@ class TestNGUpToDateCheckIntegrationTest extends AbstractIntegrationSpec { | |
@Issue('https://github.com/gradle/gradle/issues/4924') | ||
def "re-executes test when #property is changed"() { | ||
given: | ||
TestNGCoverage.enableTestNG(buildFile) | ||
buildScript """ | ||
apply plugin: "java" | ||
${mavenCentralRepository()} | ||
testing { | ||
suites { | ||
test { | ||
useTestNG('${TestNGCoverage.NEWEST}') | ||
targets { | ||
all { | ||
testTask.configure { | ||
options { | ||
/* left empty */ | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
""" | ||
|
||
when: | ||
succeeds ':test' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there was/is a reason for the remove all behavior - I think it just wasn't a problem since there was only 1 deprecation of any given type tested for at once. This change supports duplicates, where the same deprecation warning text appears multiple times within a single build. This is needed now with the new Options configuration warning added in this PR.