Does "dub test" run tests?
Russel Winder via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Mar 20 02:07:37 PDT 2017
On Mon, 2017-03-20 at 08:39 +0000, Russel Winder wrote:
> […]
> Actually it seems worse than that. Even with "dub -b unittest" it
> appears that Dub compiles main.d without the -unittest flag to ldc2
> and so the normal application runs.
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
|> dub test --build=release
No source files found in configuration 'library'. Falling back to "dub -b unittest".
Performing "release" build using dmd for x86_64.
approxgc ~master: building configuration "application"...
Linking...
Running ./approxgc
["b":["b_1.2.1.txt", "b_1.0.0.txt", "b_1.0.2.txt"], "a":["a_1.1.0.txt", "a_1.0.1.txt", "a_1.0.0.txt"]]
["b_1.0.0.txt", "b_1.0.2.txt", "a_1.0.0.txt", "a_1.0.1.txt"]
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20170320/c1298f3e/attachment-0001.sig>
More information about the Digitalmars-d-learn
mailing list