Page MenuHomePhabricator

[CMAKE] Allow for installing test executables
ClosedPublic

Authored by Fabien on Aug 18 2020, 09:04.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCc6eb8a9a5fa0: [CMAKE] Allow for installing test executables
Summary

By default none is installed.

Installation via components (the usual way) is not really possible with
tests which have EXCLUDE_FROM_ALL targets. Depending on your cmake
version the support may vary, but generally speaking cmake doesn't know
how to handle it. A solution is to create a custom target to run the
installation that will take care of building the executable targets
first.

The tests can be installed via several install targets:

  • install-tests builds and installs all the tests
  • install-test-suite-<suite> builds and installs the tests from a

single test suite.

  • install-<suite>-<test> builds an installs a single test from
Test Plan

Note: no need to build anything prior running the commands.

ninja install-tests
ninja install-test-suite-avalanche
ninja install-leveldb-arena_test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable