digitalmars.D.learn - How do I run multiple unittests with rdmd?
- Anthony (7/7) Mar 04 2021 Hello,
- H. S. Teoh (12/23) Mar 04 2021 Do you have multiple applications, or a single application spread across
- Anthony (5/11) Mar 04 2021 I should have mentioned, this is for a library that is used by
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?
Mar 04 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.
Mar 04 2021
On Friday, 5 March 2021 at 02:08:37 UTC, H. S. Teoh wrote: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.I didn't know that. Good to know. ThanksOnly in the former case would you need to use your `find` pipeline above. :-)I should have mentioned, this is for a library that is used by multiple applications. So I guess the find pipeline is the way to go then.
Mar 04 2021