[phobos] Windows unit tests shouldn't be in one folder

Rainer Schuetze r.sagitario at gmx.de
Fri Jan 20 01:19:21 PST 2012


On 20.01.2012 07:49, Jonathan M Davis wrote:
> The unit tests on Linux maintain the module hierarchy when they're compiled.
> For example, on 64-bit Linux, std.net.isemail's unit test object file and
> binary go in generated/linux/debug/64/unittest/std/net/. However, on Windows,
> they all go in the unittest folder.
>
> That doesn't support having both debug and release builds. It doesn't support
> architecture (though we don't have to deal with anything other than 32-bit on
> Windows just yet). And most importantly for what I'm dealing with at the
> moment, it doesn't support having multiple sub-modules with the same name.
>
> In my case, I'm working on splitting std.datetime into sub-modules in
> std.dtime, and it makes some sense to have a windows.d with some of the
> windows-specific functions in it. However, there is already a
> std/c/windows/windows.d. So, on Windows, they would both be trying to compile
> to the same place in spite of the fact that they're in completely different
> packages.
>
> Would someone who's knowledgable enough about makefiles (and the Windows
> makefile in particular) be able and willing to fix win32.mak so that the unit
> tests get compiled within a hierarchy (possibly even in the exact same way
> that Linux does - e.g. generate/windows/debug/32/unittest/std/net)?
>
> - Jonathan M Davis


Some time ago, I have completely given up on the druntime/phobos 
makefiles for windows because of similar issues. I'm using the posix 
makefiles (with minor patches) on windows with the help of these ancient 
unix-tools that come with a low installation cost: 
http://unxutils.sourceforge.net/

If there is interest, I could try to create a pull request.

Rainer


More information about the phobos mailing list