diff --git a/build.sc b/build.sc index 825c1907d57..2c64d604685 100644 --- a/build.sc +++ b/build.sc @@ -6,6 +6,7 @@ import mill.scalalib.scalafmt._ import coursier.maven.MavenRepository import mill.scalalib.api.ZincWorkerUtil.matchingVersions import $file.common +import $file.tests import $file.project.Boilerplate object v { diff --git a/tests.sc b/tests.sc new file mode 100644 index 00000000000..915c312d02f --- /dev/null +++ b/tests.sc @@ -0,0 +1,79 @@ +import mill._ +import mill.scalalib._ +import $file.common + +trait SvsimUnitTestModule + extends TestModule + with ScalaModule + with TestModule.ScalaTest { + def svsimModule: common.SvsimModule + + def scalatestIvy: Dep + + def scalacheckIvy: Dep + + override def moduleDeps = Seq(svsimModule) + + override def defaultCommandName() = "test" + + override def ivyDeps = super.ivyDeps() ++ Agg( + scalatestIvy, + scalacheckIvy + ) +} + +trait FirrtlUnitTestModule + extends TestModule + with ScalaModule + with TestModule.ScalaTest { + def firrtlModule: common.FirrtlModule + + def scalatestIvy: Dep + + def scalacheckIvy: Dep + + override def moduleDeps = Seq(firrtlModule) + + override def defaultCommandName() = "test" + + override def ivyDeps = super.ivyDeps() ++ Agg( + scalatestIvy, + scalacheckIvy + ) +} + +trait ChiselUnitTestModule + extends TestModule + with ScalaModule + with common.HasChisel + with common.HasMacroAnnotations + with TestModule.ScalaTest { + def scalatestIvy: Dep + + def scalacheckIvy: Dep + + override def defaultCommandName() = "test" + + override def ivyDeps = super.ivyDeps() ++ Agg( + scalatestIvy, + scalacheckIvy + ) +} + +trait CIRCTPanamaBinderModuleTestModule + extends TestModule + with ScalaModule + with common.HasCIRCTPanamaBinderModule + with common.HasMacroAnnotations + with TestModule.ScalaTest { + def scalatestIvy: Dep + + def scalacheckIvy: Dep + + override def defaultCommandName() = "test" + + override def ivyDeps = super.ivyDeps() ++ Agg( + scalatestIvy, + scalacheckIvy + ) +}