Skip to content

Commit

Permalink
Moved tests from spotbugs project to spotbugs-tests project
Browse files Browse the repository at this point in the history
The only change except moving sources is to configure two unstable tests
run before all other tests - this avoids the failure that can't be
observed if running tests one by one.

Fixes #1914
  • Loading branch information
iloveeclipse committed Jan 12, 2022
1 parent e9bb7ec commit eeb5c78
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
## Unreleased - 2022-??-??
### Fixed
- Fixed spotbugs build with ecj compiler ([#1903](https://github.com/spotbugs/spotbugs/issues/1903))
- Moved tests from spotbugs project to spotbugs-tests project ([#1914](https://github.com/spotbugs/spotbugs/issues/1914))

## 4.5.3 - 2022-01-04
### Security
Expand Down
21 changes: 18 additions & 3 deletions spotbugs-tests/build.gradle
Expand Up @@ -35,9 +35,24 @@ tasks.named('jacocoTestReport', JacocoReport).configure {
additionalClassDirs.setFrom files(project(':spotbugs').sourceSets.main.output.classesDirs)
}

tasks.named('test').configure {
dependsOn ':spotbugsTestCases:build'
maxHeapSize = '2G'
// Tests below fail if executed with other tests
// So we run them before all other tests are executed
task unstableTest(type: Test) {
filter {
includeTestsMatching "PlaceholderTest"
includeTestsMatching "MutableClassesTest"
}
testLogging {
events "passed", "skipped", "failed"
}
}

test {
dependsOn ':spotbugsTestCases:build', 'unstableTest'
filter {
excludeTestsMatching "PlaceholderTest"
excludeTestsMatching "MutableClassesTest"
}
}

spotbugs {
Expand Down

0 comments on commit eeb5c78

Please sign in to comment.