Merge pull request #7677 from eed3si9n/wip/delete-ivy-test

[2.x] refactor: Delete Ivy-related test
This commit is contained in:
eugene yokota 2024-09-16 01:08:48 -04:00 committed by GitHub
commit ac0edfc6bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 0 additions and 125 deletions

View File

@ -1,31 +0,0 @@
ThisBuild / turbo := true
ThisBuild / scalaVersion := "2.12.17"
import java.nio.file.Files
import java.nio.file.attribute.FileTime
import scala.jdk.CollectionConverters.*
val rewriteIvy = inputKey[Unit]("Rewrite ivy directory")
ThisBuild / useCoursier := false
val snapshot = (project in file(".")).settings(
name := "akka-test",
scalaVersion := "2.12.19",
libraryDependencies ++= Seq(
"com.lihaoyi" %% "utest" % "0.6.6" % "test"
),
testFrameworks += TestFramework("utest.runner.Framework"),
resolvers += "Local Maven" at file("ivy").toURI.toURL.toString,
libraryDependencies += "sbt" %% "foo-lib" % "0.1.0-SNAPSHOT",
rewriteIvy := {
val dir = Def.spaceDelimited().parsed.head
sbt.IO.delete(baseDirectory.value / "ivy")
sbt.IO.copyDirectory(
baseDirectory.value / s"libraries/library-$dir/ivy",
baseDirectory.value / "ivy"
)
Files.walk(file("ivy").getCanonicalFile.toPath).iterator.asScala.foreach { f =>
Files.setLastModifiedTime(f, FileTime.fromMillis(System.currentTimeMillis + 3000))
}
}
)

View File

@ -1,5 +0,0 @@
name := "foo-lib"
organization := "sbt"
publishTo := Some(Resolver.file("test-resolver", file("").getCanonicalFile / "ivy"))

View File

@ -1,20 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>sbt</groupId>
<artifactId>foo-lib_2.12</artifactId>
<packaging>jar</packaging>
<description>foo-lib</description>
<version>0.1.0-SNAPSHOT</version>
<name>foo-lib</name>
<organization>
<name>sbt</name>
</organization>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.12.19</version>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +0,0 @@
package sbt
object Foo {
def x: Int = 1
}

View File

@ -1,5 +0,0 @@
name := "foo-lib"
organization := "sbt"
publishTo := Some(Resolver.file("test-resolver", file("").getCanonicalFile / "ivy"))

View File

@ -1,20 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>sbt</groupId>
<artifactId>foo-lib_2.12</artifactId>
<packaging>jar</packaging>
<description>foo-lib</description>
<version>0.1.0-SNAPSHOT</version>
<name>foo-lib</name>
<organization>
<name>sbt</name>
</organization>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.12.19</version>
</dependency>
</dependencies>
</project>

View File

@ -1,5 +0,0 @@
package sbt
object Foo {
def x: Int = 2
}

View File

@ -1,11 +0,0 @@
package sbt
import utest._
object SnapshotTest extends TestSuite {
val tests: Tests = Tests {
'foo - {
com.swoval.Foo.x ==> 1
}
}
}

View File

@ -1,5 +0,0 @@
> rewriteIvy 1
# If the ClassLoaderCache is not correctly set up, then the sbt testing framework fails to work correctly
> test
> rewriteIvy 2
-> test