bitcoin / bitcoin/bitcoin

RFC: Build feature set shouldn't affect the total unit test list

Open
#35,741 4 comments 1 reaction 0 assignees View on GitHub
Build system Tests
Dominant language
C++
Stars
90.2k
Forks
39.4k
Avg merge
3d 8h
Merged PRs (30d)
88

Description

Currently, the build system includes source files with unit tests depending on the actual build feature set, including options such as `ENABLE_WALLET`, `ENABLE_IPC` and `BUILD_GUI_TESTS`.

This leads to confusion when test results from different builds are aggregated together, for example, in https://my.cdash.org/index.php?project=bitcoin-core. It raises questions about why the total number of tests differs across builds.

The functional tests take a better approach by simply disabling tests for unavailable features.

I believe the unit tests should adopt the same approach.

In light of the ongoing modernization of the test framework (https://github.com/bitcoin/bitcoin/pull/33483 and https://github.com/bitcoin/bitcoin/pull/35713), I wonder whether those efforts are compatible with this idea.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked test-framework modernization pull requests and compare how functional tests handle unavailable features with the current unit-test build behavior. Determine whether the proposed approach can keep the total unit-test list consistent across feature sets; done means the design is compatible with the ongoing modernization and the expected behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.