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: Backport PR29263 from the master branch #113

Merged
merged 2 commits into from
Mar 17, 2024

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Mar 8, 2024

This PR backports build system changes from bitcoin#29263.

@hebasto
Copy link
Owner Author

hebasto commented Mar 8, 2024

Friendly ping @fanquake @vasild @TheCharlatan @m3dwards @pablomartin4btc :)

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.

ACK 33a454e

As mentioned in the backported PR description: "All platforms now use our internal functions rather than libc or platform-specific ones, with the exception of MSVC.".

@hebasto hebasto merged commit dda7fbc into cmake-staging Mar 17, 2024
27 checks passed
hebasto added a commit that referenced this pull request Aug 15, 2024
784a87e fixup! doc: Update for CMake-based build system (Hennadii Stepanov)

Pull request description:

  On the master branch, `make check` generates a `foo_tests.log` file for each `foo_tests.cpp`.  These log files are only printed when a test fails. Since no one has raised concerns about the log file [renaming](bitcoin#19385 (comment)) in bitcoin#19385, these files appear to serve no other purpose.

  CTest provides its own mechanisms for logging failed tests, making the creation of `foo_tests.log` files unnecessary.

  This PR documents these CTest logging mechanisms.

  An example of output with a mocked test error:
  ```
  $ ctest --test-dir build -j 16 --output-on-failure
  Internal ctest changing into directory: /home/hebasto/git/bitcoin/build
  Test project /home/hebasto/git/bitcoin/build
          Start  10: amount_tests
          Start   6: tests
          Start   5: noverify_tests
          Start 120: coinselector_tests
          Start   7: exhaustive_tests
          Start  29: coins_tests
          Start 130: wallet_tests
          Start  75: random_tests
          Start 102: transaction_tests
          Start   1: util_test_runner
          Start 133: walletload_tests
          Start  31: coinstatsindex_tests
          Start  63: net_tests
          Start  35: crypto_tests
          Start  27: checkqueue_tests
          Start  56: miner_tests
    1/133 Test  #10: amount_tests .........................***Failed    0.02 sec
  Running 4 test cases...
  ./src/test/amount_tests.cpp(19): error: in "amount_tests/MoneyRangeTest": check MoneyRange(MAX_MONEY) == false has failed [true != false]

  *** 1 failure is detected in the test module "Bitcoin Core Test Suite"

          Start 113: validation_block_tests
    2/133 Test #113: validation_block_tests ...............   Passed    1.02 sec
  < snip >
  133/133 Test   #6: tests ................................   Passed  100.94 sec

  99% tests passed, 1 tests failed out of 133

  Total Test time (real) = 100.95 sec

  The following tests FAILED:
   10 - amount_tests (Failed)
  Errors while running CTest
  ```

  ---

  A question for reviewers: Do we really need the `--log_level=test_suite` option for these logs?

ACKs for top commit:
  vasild:
    ACK 784a87e

Tree-SHA512: bfe4ab2c7f9002584a41efa3607c911b6c635720ae5a6d080294b3240c4df546d25e5ac0d667881b836f6c47f2e55915e093ca14765951c40d4856482b52a9fd
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