unittests are really part of the build, not a special run

Jeremy Powers via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 2 11:19:32 PDT 2015


On Wed, Apr 1, 2015 at 7:31 AM, Johannes Totz via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 31/03/2015 19:24, Andrei Alexandrescu wrote:
> > Probably not; we're looking at two different builds. The build to be
> > deployed has no unittest code at all.
>
> I'm starting to see this differently these days (basically since I
> started to use jenkins for everything):
> A build you haven't unit tested has implicitly failed. That means the
> release build that does not have any unit test bits is not deployable.
> Instead, compile as usual (both debug and release), and run unit tests
> against both (e.g. to catch compiler bugs in the optimiser).
> Then for deployment, drop/strip/remove/dont-package the unit test code.
>
>
This.

I want to run unit tests as part of the build process, and I want my
release build to have unit tests run against it.  If unit tests haven't
passed for a build, it's not release ready.  But, I don't want my release
build to be bloated with unit test code.

Related, unit tests often have dependencies that I _don't_ want as part of
my release build.  Mocking frameworks are a good example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150402/10c249aa/attachment-0001.html>


More information about the Digitalmars-d mailing list