Skip to content

Commit

Permalink
Move test projects into os/test/ folder (#289)
Browse files Browse the repository at this point in the history
They aren't important enough to be top-level folders, since they really
belong to the test suite
  • Loading branch information
lihaoyi authored Aug 4, 2024
1 parent c422212 commit 6ab4c65
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ trait MiMaChecks extends Mima {
)
}

object testJarWriter extends JavaModule
object testJarReader extends JavaModule
object testJarExit extends JavaModule

trait OsLibModule
extends CrossScalaModule
with PublishModule
Expand All @@ -85,13 +81,9 @@ trait OsLibModule

trait OsLibTestModule extends ScalaModule with TestModule.Utest with SafeDeps {
def ivyDeps = Agg(Deps.utest, Deps.sourcecode)

// we check the textual output of system commands and expect it in english
def forkEnv = super.forkEnv() ++ Map(
"LC_ALL" -> "C",
"TEST_JAR_WRITER_ASSEMBLY" -> testJarWriter.assembly().path.toString,
"TEST_JAR_READER_ASSEMBLY" -> testJarReader.assembly().path.toString,
"TEST_JAR_EXIT_ASSEMBLY" -> testJarExit.assembly().path.toString,
"TEST_SUBPROCESS_ENV" -> "value"
)
}
Expand Down Expand Up @@ -122,9 +114,22 @@ trait OsModule extends OsLibModule { outer =>

object os extends Module {


object jvm extends Cross[OsJvmModule](scalaVersions)
trait OsJvmModule extends OsModule with MiMaChecks {
object test extends ScalaTests with OsLibTestModule
object test extends ScalaTests with OsLibTestModule{

// we check the textual output of system commands and expect it in english
def forkEnv = super.forkEnv() ++ Map(
"TEST_JAR_WRITER_ASSEMBLY" -> testJarWriter.assembly().path.toString,
"TEST_JAR_READER_ASSEMBLY" -> testJarReader.assembly().path.toString,
"TEST_JAR_EXIT_ASSEMBLY" -> testJarExit.assembly().path.toString,
)

object testJarWriter extends JavaModule
object testJarReader extends JavaModule
object testJarExit extends JavaModule
}
object nohometest extends ScalaTests with OsLibTestModule
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6ab4c65

Please sign in to comment.