Skip to content

Commit

Permalink
Fix mill testing on mill 0.11 and add mill to README and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Oct 27, 2023
1 parent d7a5dd8 commit 24a614e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/template-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
GROUP="com.github.$SAFE_ORG"
# Replace placeholders
sed -i "s/%NAME%/$NAME/g" build.sbt build.sc README.md
sed -i "s/%NAME%/$NAME/g" build.sbt build.sc README.md src/test/scala/gcd
sed -i "s/%REPOSITORY%/${GITHUB_REPOSITORY/\//\\/}/g" README.md
sed -i "s/%ORGANIZATION%/$GROUP/g" build.sbt
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ You can run the included test with:
sbt test
```

Alternatively, if you use Mill:
```sh
mill %NAME%.test
```

You should see a whole bunch of output that ends with something like the following lines
```
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
Expand Down
2 changes: 1 addition & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object %NAME% extends SbtModule { m =>
override def scalacPluginIvyDeps = Agg(
ivy"org.chipsalliance:::chisel-plugin:5.0.0",
)
object test extends Tests with ScalaTest {
object test extends SbtModuleTests with TestModule.ScalaTest {
override def ivyDeps = m.ivyDeps() ++ Agg(
ivy"edu.berkeley.cs::chiseltest:5.0.0"
)
Expand Down
8 changes: 6 additions & 2 deletions src/test/scala/gcd/GCDSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ import chisel3.experimental.BundleLiterals._
* This is a trivial example of how to run this Specification
* From within sbt use:
* {{{
* testOnly gcd.GcdDecoupledTester
* testOnly gcd.GCDSpec
* }}}
* From a terminal shell use:
* {{{
* sbt 'testOnly gcd.GcdDecoupledTester'
* sbt 'testOnly gcd.GCDSpec'
* }}}
* Testing from mill:
* {{{
* mill %NAME%.test.testOnly gcd.GCDSpec
* }}}
*/
class GCDSpec extends AnyFreeSpec with ChiselScalatestTester {
Expand Down

0 comments on commit 24a614e

Please sign in to comment.