Skip to content

cmake: Inline test definitions with target definitions#275

Merged
hebasto merged 1 commit into
cmake-stagingfrom
240720-cmake-HH
Jul 23, 2024
Merged

cmake: Inline test definitions with target definitions#275
hebasto merged 1 commit into
cmake-stagingfrom
240720-cmake-HH

Conversation

@hebasto
Copy link
Copy Markdown
Owner

@hebasto hebasto commented Jul 20, 2024

This PR addresses https://github.com/hebasto/bitcoin/pull/73/files#r1501004156:

why are these defined here rather than inline with the build rules?

This change improves code locality, readability and maintainability.

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 20, 2024

Friendly ping @theuni :)

Copy link
Copy Markdown

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK e0845da

I've run the gui tests after the build.
git clone --depth=1 --branch 240720-cmake-HH https://github.com/hebasto/bitcoin.git bitcoin-hebasto
cd bitcoin-hebasto
cmake -B build -DBUILD_GUI=ON -DBUILD_GUI_TESTS=ON

...

Configure summary
=================
Executables:
  bitcoind ............................ ON
  bitcoin-node (multiprocess) ......... OFF
  bitcoin-qt (GUI) .................... ON
  bitcoin-gui (GUI, multiprocess) ..... OFF
  bitcoin-cli ......................... ON
  bitcoin-tx .......................... ON
  bitcoin-util ........................ ON
  bitcoin-wallet ...................... ON
  bitcoin-chainstate (experimental) ... OFF
  libbitcoinkernel (experimental) ..... OFF
Optional features:
  wallet support ...................... ON
   - descriptor wallets (SQLite) ...... ON
   - legacy wallets (Berkeley DB) ..... OFF
  external signer ..................... ON
  port mapping:
   - using NAT-PMP .................... OFF
   - using UPnP ....................... OFF
  ZeroMQ .............................. OFF
  USDT tracing ........................ OFF
  QR code (GUI) ....................... ON
  DBus (GUI, Linux only) .............. ON
Tests:
  test_bitcoin ........................ ON
  test_bitcoin-qt ..................... ON
  bench_bitcoin ....................... OFF
  fuzz binary ......................... OFF

...

cmake --build build

...

[100%] Linking CXX executable test_bitcoin
[100%] Built target test_bitcoin

./build/src/qt/test/test_bitcoin-qt
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
********* Start testing of AppTests *********
Config: Using QtTest library 5.15.3, Qt 5.15.3 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 11.3.0), ubuntu 22.04

...

All tests passed.

I've also run the ctest (132 tests passed vs 127 when I reviewed previously #73)

ctest -j 10
Test project /home/pablo/workspace/bitcoin-hebasto/build
        Start   1: util_test_runner
  1/132 Test   #1: util_test_runner .....................   Passed    3.30 sec
        Start   2: util_rpcauth_test
  2/132 Test   #2: util_rpcauth_test ....................   Passed    0.04 sec
        Start   3: univalue_test
  3/132 Test   #3: univalue_test ........................   Passed    0.00 sec
        Start   4: univalue_object_test
  4/132 Test   #4: univalue_object_test .................   Passed    0.00 sec
...

100% tests passed, 0 tests failed out of 132

Total Test time (real) = 132.92 sec

Copy link
Copy Markdown

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e0845da

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jul 23, 2024

@pablomartin4btc @TheCharlatan

Sorry guys for the unnoticed merge conflict with #272.

I had to rebase this branch. Do you mind re-ACKing please?

@m3dwards
Copy link
Copy Markdown

ACK eadb850

@hebasto hebasto merged commit 52c997f into cmake-staging Jul 23, 2024
@pablomartin4btc
Copy link
Copy Markdown

re-ACK eadb850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants