Running tests for a large library on Windows

kinke kinke at libero.it
Mon Sep 24 11:20:58 UTC 2018


On Monday, 24 September 2018 at 09:49:38 UTC, pineapple wrote:
> I've been setting up CI tests and OSX and Linux tests are good 
> to go thanks to Travis. I'm having a little more difficulty 
> with testing on Windows via AppVeyor, since DMD is too 
> memory-hungry to `dub test` without a fatal error when DMD was 
> compiled for a 32-bit target as opposed to 64-bit, as is the 
> case for all Windows releases.
>
> How can I compile and run unit tests for only a part of the 
> library at a time, so that 32-bit Windows can run tests too? 
> (Which is actually important, since there are different x86 and 
> x86-64 implementations of some library functions.)

If there was a 64-bit DMD for Windows (not available AFAIK), 
you'd simply compile with `-m32` or `-m32mscoff`.

> Or is there another solution? It's my understanding that phobos 
> would have a similar problem if it didn't do something 
> deliberate with how tests are run.

Definitely; there are various Phobos modules requiring more than 
2 GB of memory when compiled with `-unittest` (at least when 
emitting 64-bit code). That's why they are compiled separately; I 
once tried compiling all of them at once, and that took something 
like 30 GB IIRC. ;)


More information about the Digitalmars-d-learn mailing list