Skip to content

Commit

Permalink
test: Remove all but one ExpensiveTag
Browse files Browse the repository at this point in the history
See [1] for context. The `ExpensiveTag` is currently not regarded
anyway, but keep it for the test enabled in eeeb5e3 as it really takes a
very long time and should not run per PR.

[1]: #5874

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Apr 28, 2024
1 parent 044358a commit ce47e72
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import io.kotest.matchers.should
import org.ossreviewtoolkit.analyzer.create
import org.ossreviewtoolkit.analyzer.resolveSingleProject
import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.ExpensiveTag
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

Expand Down Expand Up @@ -58,7 +57,6 @@ class GradleAndroidFunTest : StringSpec({
}

"Cyclic dependencies over multiple libraries can be handled".config(
tags = setOf(ExpensiveTag),
// This requires some work to make results comparable to the serialized PackageManagerResult.
enabled = false
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.plugins.versioncontrolsystems.git.GitCommand
import org.ossreviewtoolkit.utils.common.Os
import org.ossreviewtoolkit.utils.common.ProcessCapture
import org.ossreviewtoolkit.utils.test.ExpensiveTag
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult
Expand Down Expand Up @@ -134,7 +133,7 @@ class GradleFunTest : StringSpec() {
}

// Disabled as it causes hangs and memory issues on CI.
"Is compatible with Gradle >= 2.14".config(tags = setOf(ExpensiveTag), enabled = false) {
"Is compatible with Gradle >= 2.14".config(enabled = false) {
// See https://blog.gradle.org/java-9-support-update.
val gradleVersionsThatSupportJava9 = arrayOf(
row("4.6", ""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import io.kotest.matchers.should
import org.ossreviewtoolkit.analyzer.create
import org.ossreviewtoolkit.analyzer.resolveSingleProject
import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.utils.test.ExpensiveTag
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult

Expand Down Expand Up @@ -57,7 +56,7 @@ class GradleAndroidFunTest : StringSpec({
result.toYaml() should matchExpectedResult(expectedResultFile, definitionFile)
}

"Cyclic dependencies over multiple libraries can be handled".config(tags = setOf(ExpensiveTag)) {
"Cyclic dependencies over multiple libraries can be handled" {
val definitionFile = getAssetFile("projects/synthetic/gradle-android-cyclic/app/build.gradle")
val expectedResultFile = getAssetFile("projects/synthetic/gradle-android-cyclic-expected-output-app.yml")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import org.ossreviewtoolkit.model.toYaml
import org.ossreviewtoolkit.plugins.versioncontrolsystems.git.GitCommand
import org.ossreviewtoolkit.utils.common.Os
import org.ossreviewtoolkit.utils.common.ProcessCapture
import org.ossreviewtoolkit.utils.test.ExpensiveTag
import org.ossreviewtoolkit.utils.test.getAssetFile
import org.ossreviewtoolkit.utils.test.matchExpectedResult
import org.ossreviewtoolkit.utils.test.patchActualResult
Expand Down Expand Up @@ -125,7 +124,7 @@ class GradleFunTest : StringSpec() {
}

// Disabled as it causes hangs and memory issues on CI.
"Is compatible with Gradle >= 2.14".config(tags = setOf(ExpensiveTag), enabled = false) {
"Is compatible with Gradle >= 2.14".config(enabled = false) {
// See https://blog.gradle.org/java-9-support-update.
val gradleVersionsThatSupportJava9 = arrayOf(
row("4.6", ""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import org.ossreviewtoolkit.model.LicenseFinding
import org.ossreviewtoolkit.model.TextLocation
import org.ossreviewtoolkit.scanner.AbstractPathScannerWrapperFunTest
import org.ossreviewtoolkit.scanner.ScannerWrapperConfig
import org.ossreviewtoolkit.utils.test.ExpensiveTag

class LicenseeFunTest : AbstractPathScannerWrapperFunTest(setOf(ExpensiveTag)) {
class LicenseeFunTest : AbstractPathScannerWrapperFunTest() {
override val scanner = Licensee("Licensee", ScannerWrapperConfig.EMPTY)

override val expectedFileLicenses = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ import org.ossreviewtoolkit.model.TextLocation
import org.ossreviewtoolkit.scanner.AbstractPathScannerWrapperFunTest
import org.ossreviewtoolkit.scanner.ScannerWrapperConfig
import org.ossreviewtoolkit.utils.spdx.getLicenseText
import org.ossreviewtoolkit.utils.test.ExpensiveTag

class ScanCodeScannerFunTest : AbstractPathScannerWrapperFunTest(setOf(ExpensiveTag)) {
class ScanCodeScannerFunTest : AbstractPathScannerWrapperFunTest() {
override val scanner = ScanCode("ScanCode", ScanCodeConfig.DEFAULT, ScannerWrapperConfig.EMPTY)

override val expectedFileLicenses = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.utils.test.ExpensiveTag

private const val PKG_VERSION = "0.4.1"

Expand Down Expand Up @@ -62,7 +61,7 @@ class GitDownloadFunTest : StringSpec() {
exception.message shouldBe "Git failed to get revisions from URL $url."
}

"Git can download a given revision".config(tags = setOf(ExpensiveTag)) {
"Git can download a given revision" {
val pkg = Package.EMPTY.copy(vcsProcessed = VcsInfo(VcsType.GIT, REPO_URL, REPO_REV))
val expectedFiles = listOf(
".git",
Expand All @@ -85,7 +84,7 @@ class GitDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Git can download only a single path".config(tags = setOf(ExpensiveTag)) {
"Git can download only a single path" {
val pkg = Package.EMPTY.copy(vcsProcessed = VcsInfo(VcsType.GIT, REPO_URL, REPO_REV, path = REPO_PATH))
val expectedFiles = listOf(
File("LICENSE"),
Expand All @@ -107,7 +106,7 @@ class GitDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Git can download based on a version".config(tags = setOf(ExpensiveTag)) {
"Git can download based on a version" {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$PKG_VERSION"),

Expand All @@ -121,7 +120,7 @@ class GitDownloadFunTest : StringSpec() {
workingTree.getRevision() shouldBe REPO_REV_FOR_VERSION
}

"Git can download only a single path based on a version".config(tags = setOf(ExpensiveTag)) {
"Git can download only a single path based on a version" {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$PKG_VERSION"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import org.ossreviewtoolkit.model.Identifier
import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.utils.test.ExpensiveTag

private const val PKG_VERSION = "v1.0.0"

Expand All @@ -50,7 +49,7 @@ class MercurialDownloadFunTest : StringSpec() {
}

init {
"Mercurial can download a given revision".config(tags = setOf(ExpensiveTag)) {
"Mercurial can download a given revision" {
val pkg = Package.EMPTY.copy(vcsProcessed = VcsInfo(VcsType.MERCURIAL, REPO_URL, REPO_REV))
val expectedFiles = listOf(
".hg",
Expand All @@ -77,7 +76,7 @@ class MercurialDownloadFunTest : StringSpec() {
}

"Mercurial can download only a single path"
.config(enabled = hg.isAtLeastVersion("4.3"), tags = setOf(ExpensiveTag)) {
.config(enabled = hg.isAtLeastVersion("4.3")) {
val pkg = Package.EMPTY.copy(
vcsProcessed = VcsInfo(VcsType.MERCURIAL, REPO_URL, REPO_REV, path = REPO_PATH)
)
Expand All @@ -103,7 +102,7 @@ class MercurialDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Mercurial can download based on a version".config(tags = setOf(ExpensiveTag)) {
"Mercurial can download based on a version" {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$PKG_VERSION"),

Expand All @@ -118,7 +117,7 @@ class MercurialDownloadFunTest : StringSpec() {
}

"Mercurial can download only a single path based on a version"
.config(enabled = hg.isAtLeastVersion("4.3"), tags = setOf(ExpensiveTag)) {
.config(enabled = hg.isAtLeastVersion("4.3")) {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$PKG_VERSION"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import org.ossreviewtoolkit.model.Package
import org.ossreviewtoolkit.model.VcsInfo
import org.ossreviewtoolkit.model.VcsType
import org.ossreviewtoolkit.utils.common.VCS_DIRECTORIES
import org.ossreviewtoolkit.utils.test.ExpensiveTag

private const val REPO_URL = "https://svn.code.sf.net/p/sendmessage/code"
private const val REPO_REV = "115"
Expand All @@ -51,7 +50,7 @@ class SubversionDownloadFunTest : StringSpec() {
}

init {
"Subversion can download a given revision".config(tags = setOf(ExpensiveTag)) {
"Subversion can download a given revision" {
val pkg = Package.EMPTY.copy(vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, REPO_REV))
val expectedFiles = listOf(
".svn",
Expand All @@ -71,7 +70,7 @@ class SubversionDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Subversion can download only a single path".config(tags = setOf(ExpensiveTag)) {
"Subversion can download only a single path" {
val pkg = Package.EMPTY.copy(
vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, REPO_REV, path = REPO_PATH)
)
Expand All @@ -92,7 +91,7 @@ class SubversionDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Subversion can download a given tag".config(tags = setOf(ExpensiveTag)) {
"Subversion can download a given tag" {
val pkg = Package.EMPTY.copy(vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, REPO_TAG))
val expectedFiles = listOf(
".svn",
Expand All @@ -113,7 +112,7 @@ class SubversionDownloadFunTest : StringSpec() {
actualFiles.joinToString("\n") shouldBe expectedFiles.joinToString("\n")
}

"Subversion can download based on a version".config(tags = setOf(ExpensiveTag)) {
"Subversion can download based on a version" {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$REPO_VERSION"),
vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, "")
Expand All @@ -125,7 +124,7 @@ class SubversionDownloadFunTest : StringSpec() {
workingTree.getRevision() shouldBe REPO_REV_FOR_VERSION
}

"Subversion can download only a single path based on a version".config(tags = setOf(ExpensiveTag)) {
"Subversion can download only a single path based on a version" {
val pkg = Package.EMPTY.copy(
id = Identifier("Test:::$REPO_VERSION"),
vcsProcessed = VcsInfo(VcsType.SUBVERSION, REPO_URL, "", path = REPO_PATH_FOR_VERSION)
Expand Down

0 comments on commit ce47e72

Please sign in to comment.