digitalmars.D - How do I run DMD unittests on win32?
- Andrej Mitrovic (7/7) Oct 02 2012 I'm starting to contribute to DMD by fixing some bugs, but I need to
- Jacob Carlborg (5/12) Oct 02 2012 I think you at least need to have the DMD, Phobos and druntime
- Daniel Murphy (6/13) Oct 02 2012 You run the makefile. It calls d_do_test. If your dmd, druntime and ph...
- Piotr Szturmaj (23/27) Oct 03 2012 It's GNU makefile.
- Andrej Mitrovic (8/10) Oct 03 2012 I have a feeling you're talking about using msys, GNU's make won't run
- Piotr Szturmaj (10/20) Oct 03 2012 Yes, I meant MinGW shell (MSYS). It appears as "MinGW Shell" in my start...
- Andrej Mitrovic (4/7) Oct 03 2012 Yeah I'm seeing this too. Ah well.. I guess I'll just have to live
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? Is it simpler to just make the pull request and wait for the autotester to finish, or should I try to do this locally first? Thanks.
Oct 02 2012
On 2012-10-03 03:04, 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? Is it simpler to just make the pull request and wait for the autotester to finish, or should I try to do this locally first? Thanks.I think you at least need to have the DMD, Phobos and druntime repositories in the same folder. -- /Jacob Carlborg
Oct 02 2012
You run the makefile. It calls d_do_test. If your dmd, druntime and phobos repositories are not where it expects you will need to modify the paths in the makefile, or change your directory layout to match that the autotester does. "Andrej Mitrovic" <andrej.mitrovich gmail.com> wrote in message news:mailman.516.1349226306.5162.digitalmars-d puremagic.com...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? Is it simpler to just make the pull request and wait for the autotester to finish, or should I try to do this locally first? Thanks.
Oct 02 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.
Oct 03 2012
On 10/3/12, Piotr Szturmaj <bncrbme jadamspam.pl> wrote:4. run MinGW and cd to /x/dmd/src/dmd/testWhat do you mean run MinGW and cd? It's a compiler not a shell..5. make DMD=/x/dmd/windows/bin/dmdI have a feeling you're talking about using msys, GNU's make won't run this makefile from the command-line, neither would mingw32-make (errors with: ! was unexpected at this time). Honestly tests shouldn't need any special shells on win32. If the makefile uses d_do_test.d to run the tests then the makefile itself can be a D script.
Oct 03 2012
Andrej Mitrovic wrote:On 10/3/12, Piotr Szturmaj <bncrbme jadamspam.pl> wrote:Yes, I meant MinGW shell (MSYS). It appears as "MinGW Shell" in my start menu.4. run MinGW and cd to /x/dmd/src/dmd/testWhat do you mean run MinGW and cd? It's a compiler not a shell..I wrote "GNU makefile" because of that: http://web.archiveorange.com/archive/v/GZgCCznbXZWfIrdzVIfB Anyway my "MinGW Shell" is able to run that makefile and all the tests.5. make DMD=/x/dmd/windows/bin/dmdI have a feeling you're talking about using msys, GNU's make won't run this makefile from the command-line, neither would mingw32-make (errors with: ! was unexpected at this time).Honestly tests shouldn't need any special shells on win32. If the makefile uses d_do_test.d to run the tests then the makefile itself can be a D script.Agreed. Few days ago I was trying to figure this out too, and found the way described in my prev post. This should be posted somewhere in the wiki, as I figured this out only after reading the above link, after googling for a quite long time...
Oct 03 2012
On 10/3/12, Piotr Szturmaj <bncrbme jadamspam.pl> wrote: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.Yeah I'm seeing this too. Ah well.. I guess I'll just have to live with msys, the d build script won't run properly without it. It's all one big hardcoded mess..
Oct 03 2012