-
Notifications
You must be signed in to change notification settings - Fork 5
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: Adjust test/README.md
instructions
#328
Conversation
cc @paplorinc @maflcko |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost ACK
18a8736
to
64ee198
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 64ee198
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to update https://github.com/hebasto/bitcoin/pull/328/files#diff-4d2a64ce14cb8b971dbba9455421b04ae7ed0c489c66d983664be5632b0de4a3R102 as well, i.e. the Makefile.test.include
mention, right?
And probably https://github.com/hebasto/bitcoin/pull/328/files#diff-4d2a64ce14cb8b971dbba9455421b04ae7ed0c489c66d983664be5632b0de4a3R111 also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 64ee198
test_bitcoin --log_level=all --run_test=getarg_tests | ||
build/src/test/test_bitcoin --log_level=all --run_test=getarg_tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous variant assumed .
is in PATH
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find that in the docs, do most people have that set?
I've put that into a separated PR. |
Adjust test/README.md instructions for cmake
64ee198
to
36117af
Compare
Reworked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with merging, but have a slight preference for simplifying a bit.
ACK 36117af
after a test file was modified, run `cmake --build build` and then run the test again. If you | ||
modify a non-test file, use `cmake --build build --target test_bitcoin` to recompile only what's needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm missing context, but whether test file was modified or production code, both cmake --build build --target test_bitcoin
and cmake --build build
will build all dependencies automagically, so maybe we can simply recommend cmake --build build --target test_bitcoin
in all cases - and if we're worried about speed, we could even mention the -j N
param here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cmake --build build --target test_bitcoin
always works.
To add a new unit test file to our test suite you need | ||
to add the file to `src/Makefile.test.include`. The pattern is to create | ||
To add a new unit test file to our test suite, you need | ||
to add the file to either `src/test/CMakeLists.txt` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you've mentioned the wallet as well, should we maybe mention that test utility functions could be extracted to src/test/util/CMakeLists.txt
(or is that too advanced for an intro readme)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or is that too advanced for an intro readme
It seems so.
test_bitcoin --log_level=all --run_test=getarg_tests | ||
build/src/test/test_bitcoin --log_level=all --run_test=getarg_tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find that in the docs, do most people have that set?
re-ACK 36117af |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 36117af
Based on #322 with the minimized diff.