Testing
Tidecoin inherits Bitcoin Core’s test layout and adds PQ, PQHD, AuxPoW, and post-quantum transport coverage.
This page is the overview. Use Functional Tests and Fuzzing for deeper workflows.
Test Layers
| Layer | Path | Purpose |
|---|---|---|
| Unit tests | src/test/, src/wallet/test/ | Fast C++ tests for primitives and subsystem behavior |
| Functional tests | test/functional/ | Python tests that drive regtest nodes through RPC and P2P |
| Fuzz tests | src/test/fuzz/ | Parser, script, P2P, policy, and crypto edge cases |
| Lint tests | test/lint/ | Static checks and style constraints |
| Test data | src/test/data/ | JSON vectors for scripts and transactions |
Common Commands
ctest --test-dir build
build/test/functional/test_runner.py
build/test/functional/test_runner.py --extendedRun wallet-heavy gated unit tests explicitly:
TIDECOIN_RUN_WALLET_TESTS=1 ./build/bin/test_tidecoin --run_test=wallet_testsTidecoin-Specific Coverage
Important Tidecoin test areas include:
| Area | Examples |
|---|---|
| PQHD | pqhd_kdf_tests, pqhd_keygen_tests, wallet_pqhd_seed_lifecycle.py, wallet_pqhd_policy.py |
| PQ keys and scripts | pq_pubkey_container_tests, pq_multisig_tests, feature_pq_script_assets.py |
| AuxPoW | auxpow_tests, auxpow_serialization_tests, auxpow_mining.py, auxpow_invalidpow.py, auxpow_zerohash.py |
| Transport | bip324_pq_tests, p2p_v2_transport.py, p2p_v2_encrypted.py |
| Transaction sizing | pq_txsize_tests |
Before Sending a PR
| Change type | Minimum local test expectation |
|---|---|
| Docs only | Docs build if the docs repo changed |
| Wallet change | Relevant wallet unit tests and wallet functional tests |
| RPC change | Unit tests where applicable plus functional coverage |
| Consensus/script change | Unit tests, functional tests, and relevant vectors |
| P2P/transport change | P2P functional tests and fuzz target where practical |
| AuxPoW change | AuxPoW unit and functional tests |
| Crypto parsing/signature change | Unit tests, vectors, and fuzzing where practical |
Debugging Failures
- Check the combined functional test logs.
- Re-run a single failing test with a clean temp directory.
- Use
--jobs=1to remove parallelism from functional test debugging. - Use
--nocleanupwhen you need to inspect node datadirs. - Confirm no unrelated
tidecoindprocess is using test ports. - For RPC coverage, use
test_runner.py --coverage.
See also: Functional Tests, Fuzzing, PQ Test Vectors, Build from Source.
Last updated on