www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Running tests for a large library on Windows

reply pineapple <meapineapple gmail.com> writes:
I do mach.d - https://github.com/pineapplemachine/mach.d

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.) 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.
Sep 24 2018
next sibling parent pineapple <meapineapple gmail.com> writes:
Speaking of which, is there any AppVeyor config or script laying 
around somewhere for how to install 64-bit DMD? Since I would 
ideally like to automate testing with both 32-bit and 64-bit DMD
Sep 24 2018
prev sibling parent kinke <kinke libero.it> writes:
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. ;)
Sep 24 2018