Stuck with DMD, and Unit-Threaded

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Apr 17 02:03:29 PDT 2017


On 2017-04-16 10:20, Russel Winder via Digitalmars-d-learn wrote:
> There are points when you need to ask someone for help…
>
> I am trying to get Dub to build integration tests from test-source as a
> separate thing from building unit tests from source. The latter is easy
> and works, as does building the application. I cannot however get the
> integration tests to build, I always get something along the lines of:
>
> ../../../../../../../tmp/dub_test_root-677ee80a-1e29-44c8-b08c-2fe37eb83633.d(10,12): Error: function D main conflicts with static import dub_test_root.main at ../../../../../../../tmp/dub_test_root-677ee80a-1e29-44c8-b08c-2fe37eb83633.d(3,15)
>
> and I haven't a clue. This is almost certainly just a bad dub.sdl file,
> but, if anyone can take a look at tell me what I am failing to get
> right, I'd appreciate it.
>
> https://github.com/russel/ApproxGC

I cannot build the tests at all:

unit_threaded/runtime.d(47,8): Error: module std.file import 'dirName' 
not found

This [1] is what I've done for one of my projects to have the tests in a 
separate directory. But I don't have any unit tests among the regular 
source files. The difference I can see is what you've specified for 
"sourceFiles". Perhaps remove "source/main.d"?

[1] https://github.com/jacob-carlborg/kiwi/blob/dev/dub.sdl#L11-L22

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list