Skip to content

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Jan 26, 2024

This is the cmake-staging branch rebased on the recent bitcoin/master one with the squashed "!fixup" commits.

Steps to reproduce:

  1. Apply the git rebase -i --autosquash fa2bcf627b8866031cd62d0a2d3ced57b17442a8 command (there is a conflict, which can be resolved by removing the .github/workflows/ci.yml file).
  2. Reorder the recent commit to bury Qt stuff deeper and pop up CI one.

A note regarding bitcoin#28875. No extra steps for backporting that PR are needed. As it was pointed earlier, it "just works":

$ cmake -B build -DFUZZ=ON -DSANITIZERS=fuzzer -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DWITH_GUI=OFF
$ cmake --build build -j $(nproc)
$ objdump --disassemble=secp256k1_xonly_pubkey_serialize build/src/test/fuzz/fuzz | grep __sanitizer_cov
  da33a1:	e8 1a b9 b7 ff       	call   91ecc0 <__sanitizer_cov_trace_const_cmp8>
  da351e:	e8 ad b6 b7 ff       	call   91ebd0 <__sanitizer_cov_trace_pc_indir>
  da3548:	e8 83 b6 b7 ff       	call   91ebd0 <__sanitizer_cov_trace_pc_indir>
  da3576:	e8 55 b6 b7 ff       	call   91ebd0 <__sanitizer_cov_trace_pc_indir>

Known Bugs

Unfortunately, due to a silent conflict between #43 and #77, providing -DFUZZ=ON does not disable the bitcoin-qt target. It will be fixed shortly after pushing this branch.

hebasto and others added 30 commits January 26, 2024 20:45
Also add a sanity check for non-encapsulated (directory-wide) build
properties.
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
To configure CMake for cross-compiling, use
`--toolchain depends/${HOST}/share/toolchain.cmake` command-line option.
@hebasto
Copy link
Owner Author

hebasto commented Jan 26, 2024

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

@hebasto
Copy link
Owner Author

hebasto commented Jan 27, 2024

@TheCharlatan

Thank you for your review!


This branch has been force pushed into the https://github.com/hebasto/bitcoin/tree/cmake-staging.

Closing.

@hebasto hebasto closed this Jan 27, 2024
@hebasto hebasto mentioned this pull request Jan 27, 2024
hebasto added a commit that referenced this pull request Jan 29, 2024
63c1bb5 fixup! cmake: Add fuzzing options (Hennadii Stepanov)
d31abc2 fixup! ci: Test CMake edge cases (Hennadii Stepanov)

Pull request description:

  From #85 (comment):
  > **Known Bugs**
  >
  > Unfortunately, due to a silent conflict between #43 and #77, providing `-DFUZZ=ON` does not disable the `bitcoin-qt` target. It will be fixed shortly after pushing this branch.

  Fixed.

ACKs for top commit:
  vasild:
    ACK 63c1bb5

Tree-SHA512: b3cc2889d0239913de64c170880c97b37966a890d8c4e05f9090485a016b7f9cdf4880d770a234f323d3191b9adda8ed0343c29dfa49b5bb99b0b54481d4335e
hebasto pushed a commit that referenced this pull request Jul 26, 2025
c40dbbb test: Move `script_assets_tests` into its own suite (Hennadii Stepanov)

Pull request description:

  This PR ensures that the `script_assets_tests` test case is explicitly reported as "Skipped" when it is not run, making it clearer when running the test suite with `ctest`:

  - on the master branch @ 9355578:
  ```
  $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_"
  Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
  Test project /home/hebasto/git/bitcoin/build
      Start 87: script_tests
      Start 83: script_p2sh_tests
      Start 85: script_segwit_tests
      Start 86: script_standard_tests
      Start 84: script_parse_tests
  1/5 Test #84: script_parse_tests ...............   Passed    0.11 sec
  2/5 Test #86: script_standard_tests ............   Passed    0.11 sec
  3/5 Test #85: script_segwit_tests ..............   Passed    0.12 sec
  4/5 Test #83: script_p2sh_tests ................   Passed    0.12 sec
  5/5 Test #87: script_tests .....................   Passed    0.36 sec

  100% tests passed, 0 tests failed out of 5

  Total Test time (real) =   0.37 sec
  ```
  - with this PR:
  ```
  $ env -u DIR_UNIT_TEST_DATA ctest --test-dir build -j 16 -R "^script_"
  Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
  Test project /home/hebasto/git/bitcoin/build
      Start 83: script_assets_tests
      Start 88: script_tests
      Start 84: script_p2sh_tests
      Start 86: script_segwit_tests
      Start 87: script_standard_tests
      Start 85: script_parse_tests
  1/6 Test #85: script_parse_tests ...............   Passed    0.11 sec
  2/6 Test #83: script_assets_tests ..............***Skipped   0.12 sec
  3/6 Test #86: script_segwit_tests ..............   Passed    0.11 sec
  4/6 Test #87: script_standard_tests ............   Passed    0.11 sec
  5/6 Test #84: script_p2sh_tests ................   Passed    0.12 sec
  6/6 Test #88: script_tests .....................   Passed    0.36 sec

  100% tests passed, 0 tests failed out of 6

  Total Test time (real) =   0.37 sec

  The following tests did not run:
   83 - script_assets_tests (Skipped)
  $ env DIR_UNIT_TEST_DATA=/home/hebasto/git/bitcoin/qa-assets/unit_test_data ctest --test-dir build -j 16 -R "^script_"
  Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
  Test project /home/hebasto/git/bitcoin/build
      Start 83: script_assets_tests
      Start 88: script_tests
      Start 84: script_p2sh_tests
      Start 86: script_segwit_tests
      Start 87: script_standard_tests
      Start 85: script_parse_tests
  1/6 Test #85: script_parse_tests ...............   Passed    0.11 sec
  2/6 Test #87: script_standard_tests ............   Passed    0.11 sec
  3/6 Test #86: script_segwit_tests ..............   Passed    0.11 sec
  4/6 Test #84: script_p2sh_tests ................   Passed    0.12 sec
  5/6 Test #88: script_tests .....................   Passed    0.35 sec
  6/6 Test #83: script_assets_tests ..............   Passed    1.58 sec

  100% tests passed, 0 tests failed out of 6

  Total Test time (real) =   1.58 sec
  ```

ACKs for top commit:
  maflcko:
    re-ACK c40dbbb 👈
  ajtowns:
    ACK c40dbbb
  achow101:
    ACK c40dbbb

Tree-SHA512: 25713e1c3b507b6f2a5fecc7b1ea285a6642b906c248769238a58fc0df48489ac5f7606778f9e3653b407b7f1d06563e1554d04321303b350c80eb888500cc5d
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.

2 participants