SpinalDoc-RTD icon indicating copy to clipboard operation
SpinalDoc-RTD copied to clipboard

getting started/sbt: compile -> Test/compile

Open numero-744 opened this issue 2 years ago • 5 comments
trafficstars

Tests are being moved to specific folder so this line should be updated.

Note: this is an untested quickfix from GH web interface

numero-744 avatar Dec 07 '22 19:12 numero-744

Hmm this PR is good enough: if we move simulations to tb we have to do Test/runMain so it would need more explanations :thinking:

numero-744 avatar Dec 07 '22 19:12 numero-744

I think runMain and test could not be mixed. runMain is used to generate the RTL for the design, while test is used to test the design. so either use sbt runMain xxxx.xxxx or sbt testOnly xxxx.xxxx for a simple case.

Readon avatar Dec 08 '22 01:12 Readon

The current way to do things is that a simulation test is defined extending App in main so currently a user should do runMain to execute this simulation test. So runMain is currently not only to generate the RTL (IMO it should be only for generation once SpinalTestBench is released).

So waiting for SpinalTestBench before adding a folder for tests is better?

numero-744 avatar Dec 08 '22 07:12 numero-744

I think runMain and test could not be mixed. runMain is used to generate the RTL for the design, while test is used to test the design. so either use sbt runMain xxxx.xxxx or sbt testOnly xxxx.xxxx for a simple case.

I would say, the main distinction between main / Test is that main will be contained in the release jar, while test will not be included. The scala test framework is something else (coupled to Test)

Dolu1990 avatar Dec 08 '22 21:12 Dolu1990

There it also that you need Test/runMain to run an App in the test (tb) folder, and just runMain if it is in the main (hw) folder

Le 8 décembre 2022 21:48:32 UTC, Dolu1990 @.***> a écrit :

I think runMain and test could not be mixed. runMain is used to generate the RTL for the design, while test is used to test the design. so either use sbt runMain xxxx.xxxx or sbt testOnly xxxx.xxxx for a simple case.

I would say, the main distinction between main / Test is that main will be contained in the release jar, while test will not be included. The scala test framework is something else (coupled to Test)

-- Reply to this email directly or view it on GitHub: https://github.com/SpinalHDL/SpinalDoc-RTD/pull/162#issuecomment-1343416005 You are receiving this because you authored the thread.

Message ID: @.***>

numero-744 avatar Dec 09 '22 06:12 numero-744