make install
in addition to make
for changes to be reflected after modification.
make install
in addition to make
for changes to be reflected after modification.
@sipa thanks for the feedback. Perhaps there is something with boost that i’m not familiar with then. If I update the test:
0diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
1index 10fb05ca8..5e0f48855 100644
2--- a/src/test/getarg_tests.cpp
3+++ b/src/test/getarg_tests.cpp
4@@ -146,15 +146,7 @@ BOOST_AUTO_TEST_CASE(intarg)
5
6 BOOST_AUTO_TEST_CASE(doubledash)
7 {
8- const auto foo = std::make_pair("-foo", ArgsManager::ALLOW_ANY);
9- const auto bar = std::make_pair("-bar", ArgsManager::ALLOW_ANY);
10- SetupArgs({foo, bar});
11- ResetArgs("--foo");
12- BOOST_CHECK_EQUAL(gArgs.GetBoolArg("-foo", false), true);
13-
14- ResetArgs("--foo=verbose --bar=1");
15- BOOST_CHECK_EQUAL(gArgs.GetArg("-foo", ""), "verbose");
16- BOOST_CHECK_EQUAL(gArgs.GetArg("-bar", 0), 1);
17+ BOOST_TEST_MESSAGE("foo");
18 }
and then run make
, followed by test_bitcoin --log_level=message --run_test=getarg_tests/doubledash
I see no message. however, after running make install
, the unit test prints the message foo
.
test_bitcoin
, which will search in $PATH
for the binary, which then most likely is the installed one. To execute unit tests from your local build, either use make check
or src/test/test_bitcoin
(as described in src/test/README.md
).
Running individual tests
since running the system installed binary isn’t useful here.
doc: add src/test/ prefix to test_bitcoin in test README
.
./test_bitcoin
or src/test/test_bitcoin
, I’ve used both many times.
src/test/test_bitcoin
is used elsewhere it is helpful to be consistent imo. Also, I think this illustrates the binary test_bitcoin
should not be the one installed with make install
.
I think this illustrates the binary test_bitcoin should not be the one installed with make install.
This is intentionally done because the test_bitcoin
is distributed as part of the downloads. People are encouraged to run test_bitcoin
on any system they intend to use bitcoind
on to increase confidence that there aren’t any strange platform-specfic issues interfering.
This is intentionally done because the test_bitcoin is distributed as part of the downloads. People are encouraged to run test_bitcoin on any system they intend to use bitcoind on to increase confidence that there aren’t any strange platform-specfic issues interfering.
That’s understandable. However, the instuctions ask you to run make
after modifying a test file. Running make only updated the file at src/test/test_bitcoin
and not the system installed bin. Otherwise the instructions should include make install
in addition to make
imo.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
No conflicts as of last run.