Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Inline test definitions with target definitions #275

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

hebasto
Copy link
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
Owner Author

hebasto commented Jul 20, 2024

Friendly ping @theuni :)

Copy link

@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

@TheCharlatan TheCharlatan 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
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

ACK eadb850

@hebasto hebasto merged commit 52c997f into cmake-staging Jul 23, 2024
38 of 40 checks passed
@pablomartin4btc
Copy link

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