target_data_sources()
function, which minimizes code needed to assign a *.json
or *.raw
data file to the test_bitcoin
or bench_bitcoin
target.
{test,bench}_bitcoin
targets
#30901
target_data_sources()
function, which minimizes code needed to assign a *.json
or *.raw
data file to the test_bitcoin
or bench_bitcoin
target.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30901.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
134+ data/sighash.json
135+ data/tx_invalid.json
136+ data/tx_valid.json
137+ RAW_FILES
138+ data/asmap.raw
139+ RAW_NAMESPACE test::data
Once such a scenario happens, we can use another call:
0target_data_sources(test_bitcoin
1 RAW_FILES
2 data/some_file_with_another_namespace.raw
3 RAW_NAMESPACE somewhere::another_namespace
4)
And I think it is better than (1) specifying data/some_file_with_another_namespace.raw
to generate a header than (2) adding ${CMAKE_CURRENT_BINARY_DIR}/data/some_file_with_another_namespac.raw.h
to the sources.
tACK 0c35be69cf2a18a7a9173d0f9f88116b4417c892
I have based #28792 on this now. It works and seems like a nicer way to do what I need there than the previous approach.
Take it with a grain of salt though because I don’t think I am experienced enough with CMake to tell if there are any hidden issues with this approach or if there are even better ways to achieve this.
re-ACK 9f14069fde2a612b1f350ab0b49cdb5d96e8ac3e
Confirmed only rebase since last review per git range-diff master 0c35be69cf2a18a7a9173d0f9f88116b4417c892 9f14069fde2a612b1f350ab0b49cdb5d96e8ac3e
🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/34533242400
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
This change introduces a new `target_data_sources()` function.
Re-ACK 4185ad1cb12060337c2d66a9a66e37be1d10f4ce
Confirmed only change was a rebase.
ACK 4185ad1cb12060337c2d66a9a66e37be1d10f4ce
My cmake knowledge is also limited, but I like that this removes duplication. E.g instead of base58_encode_decode.json.h
and data/base58_encode_decode.json
now test/CMakeLists.txt
only contains the latter.
The build log looks the same, before and after:
0[ 76%] Generating data/base58_encode_decode.json.h