Does "dub test" run tests?

Jacob Carlborg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 20 08:58:40 PDT 2017


On 2017-03-20 10:07, Russel Winder via Digitalmars-d-learn wrote:

> And different behaviour with different build options, at least when
> using dmd, but I think the same is true for ldc2:
>
>
> |> dub test
> No source files found in configuration 'library'. Falling back to "dub -b unittest".
> Performing "unittest" build using dmd for x86_64.
> approxgc ~master: building configuration "application"...
> Linking...
> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
> (.text+0x20): undefined reference to `main'
> collect2: error: ld returned 1 exit status
> Error: linker exited with status 1
> dmd failed with exit code 1.
> 600 anglides:~/Repositories/Git/Masters/ApproxGC_D

For me it works with "dub test" using DMD. But Dub does not seem to 
include its own "main" for running the tests.

These are the interesting flags that Dub uses when invoking DMD when 
"dub test --verbose" is run:

-debug -g -unittest -w

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list