On Sat, 15 Oct 2016 19:30:38 +0200, Christian Köstlin wrote:

Hi,

I want to run my unit-tests (std. dlang unit-tests) compiled with the
same flags as a releasebuild. How do I do this with dub using dub.sdl?

Thanks in advance,
Christian

The easiest way would be to add this:

buildType "unittest" {
  buildOptions "releaseMode" "optimize" "inline" "unittest" "debugInfo"
}

Alternatively, you could also add a build type with a custon name such as "unittest-release" and then run dub test -b unittest-release.