How do I run multiple unittests with rdmd?
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Mar 5 02:08:37 UTC 2021
On Fri, Mar 05, 2021 at 01:47:41AM +0000, Anthony via Digitalmars-d-learn wrote:
> Hello,
>
> I'm trying to run multiple unittest files with rdmd.
> So far I use `find` to just pipe in the files. Eg:
>
>
> time find source -name *__tests.d -exec rdmd -unittest --main
> -I../libprelude/source -I../libparser/source -I../libgeometry/source
> -Isource {} \;
>
> Is there an easier way to do this?
Do you have multiple applications, or a single application spread across
multiple sources?
In the latter case, you could just use `rdmd -unittest -i -run main.d`
(replace `main.d` with whatever source file contains main()) to
automatically compile all modules including their unittests *and* run
'em all in one shot.
Only in the former case would you need to use your `find` pipeline
above. :-)
T
--
Computers aren't intelligent; they only think they are.
More information about the Digitalmars-d-learn
mailing list