How do I run DMD unittests on win32?

Piotr Szturmaj bncrbme at jadamspam.pl
Wed Oct 3 01:54:59 PDT 2012


Andrej Mitrovic wrote:
> I'm starting to contribute to DMD by fixing some bugs, but I need to
> run the test-suite. Anyone know how this is done on win32? There's a
> makefile in the test dir but what I don't know is if I need to set up
> my directory structure in any special way?

It's GNU makefile.

You need:

1. MinGW
2. unzip.exe (I use this one: 
http://gnuwin32.sourceforge.net/packages/unzip.htm) - it must be in the 
PATH env. var.

Next:

3. copy your modified dmd.exe to x:\dmd\windows\bin (this is the most 
straightforward way)
4. run MinGW and cd to /x/dmd/src/dmd/test
5. make DMD=/x/dmd/windows/bin/dmd

where x is your drive letter.

By default make runs all tests, but you can select smaller area with 
these targets:

run_runnable_tests
run_compilable_tests
run_fail_compilation_tests

for example: make run_compilable_tests DMD=/x/dmd/windows/bin/dmd

After all, use make clean to delete test results.

P.S. I couldn't manage to run the tests without copying the dmd. Without 
a copy I constantly encountered missing object.d file errors, even if I 
set correct paths to druntime/import.


More information about the Digitalmars-d mailing list