Skip to content

Separate executable for unit tests #16127

Open
@appgurueu

Description

@appgurueu

Problem

I want to be able to compile unit tests without compiling the rest of the engine. This is especially important if I'm editing fundamental Irrlicht headers. The same goes for benchmarks.

I also do not want release builds to have unit tests mixed in (e.g. I recall some Ubuntu builds where they would just segfault; otherwise they can't run fully because devtest is missing).

Furthermore (probably for the above reasons and more) there is an expectation for unit tests to be separate. See #16072 (comment).

Solutions

Make the C++ unit tests & benchmarks a separate build target.

Alternatives

Leave it as is. Tolerable but sometimes a bit annoying; currently I see this as low priority.

We can also split up headers a bit to avoid unnecessary transitive includes and improve compile times overall. For a large header like matrix4.h (some two kloc) which is (transitively) included hundreds of times, this should make a difference.

Additional context

See also: #13610. Ideally everything should be managed by Catch2 in the end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @ BuildCMake, build scripts, official builds, compiler and linker errorsFeature requestIssues that request the addition or enhancement of a featureLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions