Skip to content

Conversation

yancyribbens
Copy link
Contributor

This PR changes the default test log location request here: #17224. Instead of using the location of the makefile automatic variable $< I extract just the basename and then prepend a new location ./test. This is done because $< represents the variable name AND location of the prerequisite here.

@maflcko
Copy link
Member

maflcko commented Jun 26, 2020

Is the location identical to abs_top_builddir/src/test?

@yancyribbens
Copy link
Contributor Author

@MarcoFalke yes, it appears so. To make it more clear, I updated the PR and replaced ./ with $(abs_builddir).

@laanwj
Copy link
Member

laanwj commented Jun 29, 2020

Something I've noticed when using out-of-tree builds is that the test logs end up in the source directory, not the build directory. Does this fix that?

Edit: It seems so:

  • Before, the test logs ended up in src/test/*.log and src/wallet/test/*.log.
  • With this PR, they only end up in build/src/test/*.log. There is no seperate directory for the wallet test logs anymore

I think putting all test logs is fine unless there are overlapping test names?

Concept ACK in any case. Thanks for working on this.

@yancyribbens
Copy link
Contributor Author

yancyribbens commented Jun 29, 2020

@laanwj, yes, this commit fixes that:

bitcoin$ ./autogen.sh
bitcoin$ cd build
bitcoin/build$ ../configure
bitcoin/build$ make check
bitcoin/build$ ls src/test/*.log

All .log files are now in build/src/test/ instead of src/test.

@laanwj
Copy link
Member

laanwj commented Jun 29, 2020

Yep thanks! I've edit my post above. My only remark is that the wallet test logs now end up in the same directory, which might or might not be a problem.

@maflcko maflcko closed this Jun 29, 2020
@maflcko maflcko reopened this Jun 29, 2020
@yancyribbens
Copy link
Contributor Author

@laanwj no problem, happy to help. Thanks for mentioning that the wallet tests get tossed into the same directory now. That's unfortunate I think. Both bitcoin and the wallet tests are added to BITCOIN_TESTS, and since the commit I made throws away the preceding path, they both end up in the same place. Seems like it would be better to have BITCOIN_TESTS and BITCOIN_WALLET_TESTS handled separately imo.

@maflcko
Copy link
Member

maflcko commented Jun 29, 2020

tested-only ACK 7be5182 did not review the code 🌬

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

tested-only ACK 7be5182cd2 did not review the code 🌬
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUj6nwv/SpacUqHGuJbnt2/Tff21H/4muFKuBGIe4KCXUVxsJHwyBAiNzNOReyDo
1TgPv9/sTFqKclg44C/cCZRH3ajnCQDqK7O4GXTTqa9YEJitTwa0O84avGp6aYY9
r3GBJqT+ya1jYNkx42mThll/4laMAGIeuAcwfH2blqO45ehvcPMVdqpczV2Zs48l
JJKIf7/meS1I5BvlyRyqmk+MtCvO21XtzLvpNshklojeHQuNDfYd3/t1aTvZ52rD
C80IREkSxbcTgNfCvbOx6lXbAHruERG6lCEqIBR9fukZexCgSNw3xPPRv2+EqJwz
NEDhBobziPaQh9Ne39c7vQlgxOchzYqXXH1AUFMU9uGff8k8edHDoeZmSW/gdIfB
sXiq6jJxRF5xpc5o1akdrVDw1n+ALHx18sUp96vA9k2XqavRi2dohZEFTFlyH/St
WMBr97RLDc10jC5hzEOrvhlBK22LazUnqBn04HFkqBzH7ssHkLI3NVyjUwtbCQnF
6sIzZbOS
=i+yC
-----END PGP SIGNATURE-----

Timestamp of file with hash ddc033eedeb04a172a4842dbda19a008d539cb63b6c26e9490651ed9a965ed99 -

@maflcko maflcko closed this Jun 29, 2020
@maflcko
Copy link
Member

maflcko commented Jun 29, 2020

not sure why travis is not running on this 🤷‍♂️

@maflcko maflcko reopened this Jun 29, 2020
@yancyribbens
Copy link
Contributor Author

@laanwj I updated this PR to preserve the relative path grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/\. The bitcoin and wallet tests logs log to their respective directories.

@yancyribbens
Copy link
Contributor Author

I also cleaned up the makefile rule so it's more readable hopefully by using some line wraps.

@yancyribbens
Copy link
Contributor Author

@MarcoFalke not sure either why Travis is ignoring this PR. Would it help to close this one and open another? I don't see any conflicts that would cause Travis to not run.

@maflcko
Copy link
Member

maflcko commented Jul 13, 2020

Concept re-ACK, happy to test

@theStack
Copy link
Contributor

theStack commented Sep 8, 2020

Concept ACK

@elmarsan
Copy link

elmarsan commented Sep 7, 2021

Hello, what is the state of this pull request?
Is the problem with Travis solved?

Thanks

@niVelion
Copy link

@MarcoFalke not sure either why Travis is ignoring this PR. Would it help to close this one and open another? I don't see any conflicts that would cause Travis to not run.

Bump @MarcoFalke for the above comment. I too wonder if closing this PR might help, though would first try re-opening it rather than creating another.

@maflcko
Copy link
Member

maflcko commented Jan 14, 2022

I think it is fine to test locally (someone needs to do that anyway)

@maflcko
Copy link
Member

maflcko commented Mar 25, 2022

In tree build:

  • log files have the cpp. infix removed
`tree` diff
diff --git a/tmp/1 b/tmp/2
index 0e4015b93..88a87988a 100644
--- a/tmp/1
+++ b/tmp/2
@@ -1,8 +1,8 @@
-diff --git a/tmp/a b/tmp/b
-index 6a6dab4b8..e165f1bf1 100644
---- a/tmp/a
-+++ b/tmp/b
-@@ -542,6 +542,8 @@
+diff --git a/tmp/c b/tmp/d
+index 1974a3640..3e621ff71 100644
+--- a/tmp/c
++++ b/tmp/d
+@@ -543,6 +543,8 @@
  |   |   `-- extract_strings_qt.py
  |   |-- rpcauth
  |   |   |-- README.md
@@ -11,7 +11,7 @@ index 6a6dab4b8..e165f1bf1 100644
  |   |   `-- rpcauth.py
  |   |-- setup.nsi
  |   `-- setup.nsi.in
-@@ -1318,6 +1320,8 @@
+@@ -1320,6 +1322,8 @@
  |   |   |   |-- test.cpp
  |   |   |   `-- util.h
  |   |   |-- test
@@ -20,7 +20,7 @@ index 6a6dab4b8..e165f1bf1 100644
  |   |   `-- tests
  |   |       `-- pyminisketch.py
  |   |-- net.cpp
-@@ -1944,6 +1948,9 @@
+@@ -1947,6 +1951,9 @@
  |   |   |   `-- lax_der_privatekey_parsing.h
  |   |   |-- doc
  |   |   |   `-- safegcd_implementation.md
@@ -30,7 +30,7 @@ index 6a6dab4b8..e165f1bf1 100644
  |   |   |-- include
  |   |   |   |-- secp256k1.h
  |   |   |   |-- secp256k1_ecdh.h
-@@ -1962,93 +1969,99 @@
+@@ -1965,94 +1972,100 @@
  |   |   |   |-- prove_group_implementations.sage
  |   |   |   |-- secp256k1_params.sage
  |   |   |   `-- weierstrass_prover.sage
@@ -73,6 +73,7 @@ index 6a6dab4b8..e165f1bf1 100644
 -|   |       |-- hash_impl.h
 -|   |       |-- libsecp256k1-config.h
 -|   |       |-- libsecp256k1-config.h.in
+-|   |       |-- libsecp256k1-config.h.in~
 -|   |       |-- libsecp256k1_la-secp256k1.lo
 -|   |       |-- libsecp256k1_la-secp256k1.o
 -|   |       |-- modinv32.h
@@ -161,6 +162,7 @@ index 6a6dab4b8..e165f1bf1 100644
 +|   |   |   |-- hash_impl.h
 +|   |   |   |-- libsecp256k1-config.h
 +|   |   |   |-- libsecp256k1-config.h.in
++|   |   |   |-- libsecp256k1-config.h.in~
 +|   |   |   |-- libsecp256k1_la-secp256k1.lo
 +|   |   |   |-- libsecp256k1_la-secp256k1.o
 +|   |   |   |-- modinv32.h
@@ -217,219 +219,219 @@ index 6a6dab4b8..e165f1bf1 100644
  |   |-- serialize.h
  |   |-- shutdown.cpp
  |   |-- shutdown.h
-@@ -2075,28 +2088,51 @@
+@@ -2079,28 +2092,51 @@
  |   |   |-- Makefile
  |   |   |-- README.md
  |   |   |-- addrman_tests.cpp
-+|   |   |-- addrman_tests.cpp.log
++|   |   |-- addrman_tests.log
  |   |   |-- allocator_tests.cpp
-+|   |   |-- allocator_tests.cpp.log
++|   |   |-- allocator_tests.log
  |   |   |-- amount_tests.cpp
-+|   |   |-- amount_tests.cpp.log
++|   |   |-- amount_tests.log
  |   |   |-- arith_uint256_tests.cpp
-+|   |   |-- arith_uint256_tests.cpp.log
++|   |   |-- arith_uint256_tests.log
  |   |   |-- banman_tests.cpp
-+|   |   |-- banman_tests.cpp.log
++|   |   |-- banman_tests.log
  |   |   |-- base32_tests.cpp
-+|   |   |-- base32_tests.cpp.log
++|   |   |-- base32_tests.log
  |   |   |-- base58_tests.cpp
-+|   |   |-- base58_tests.cpp.log
++|   |   |-- base58_tests.log
  |   |   |-- base64_tests.cpp
-+|   |   |-- base64_tests.cpp.log
++|   |   |-- base64_tests.log
  |   |   |-- bech32_tests.cpp
-+|   |   |-- bech32_tests.cpp.log
++|   |   |-- bech32_tests.log
  |   |   |-- bip32_tests.cpp
-+|   |   |-- bip32_tests.cpp.log
++|   |   |-- bip32_tests.log
  |   |   |-- blockchain_tests.cpp
-+|   |   |-- blockchain_tests.cpp.log
++|   |   |-- blockchain_tests.log
  |   |   |-- blockencodings_tests.cpp
-+|   |   |-- blockencodings_tests.cpp.log
++|   |   |-- blockencodings_tests.log
  |   |   |-- blockfilter_index_tests.cpp
-+|   |   |-- blockfilter_index_tests.cpp.log
++|   |   |-- blockfilter_index_tests.log
  |   |   |-- blockfilter_tests.cpp
-+|   |   |-- blockfilter_tests.cpp.log
++|   |   |-- blockfilter_tests.log
  |   |   |-- bloom_tests.cpp
-+|   |   |-- bloom_tests.cpp.log
++|   |   |-- bloom_tests.log
  |   |   |-- bswap_tests.cpp
-+|   |   |-- bswap_tests.cpp.log
++|   |   |-- bswap_tests.log
  |   |   |-- checkqueue_tests.cpp
-+|   |   |-- checkqueue_tests.cpp.log
++|   |   |-- checkqueue_tests.log
  |   |   |-- coins_tests.cpp
-+|   |   |-- coins_tests.cpp.log
++|   |   |-- coins_tests.log
  |   |   |-- coinstatsindex_tests.cpp
-+|   |   |-- coinstatsindex_tests.cpp.log
++|   |   |-- coinstatsindex_tests.log
  |   |   |-- compilerbug_tests.cpp
-+|   |   |-- compilerbug_tests.cpp.log
++|   |   |-- compilerbug_tests.log
  |   |   |-- compress_tests.cpp
-+|   |   |-- compress_tests.cpp.log
++|   |   |-- compress_tests.log
  |   |   |-- crypto_tests.cpp
-+|   |   |-- crypto_tests.cpp.log
++|   |   |-- crypto_tests.log
  |   |   |-- cuckoocache_tests.cpp
-+|   |   |-- cuckoocache_tests.cpp.log
++|   |   |-- cuckoocache_tests.log
  |   |   |-- data
  |   |   |   |-- README.md
  |   |   |   |-- asmap.raw
-@@ -2120,10 +2156,15 @@
+@@ -2124,10 +2160,15 @@
  |   |   |   |-- tx_valid.json
  |   |   |   `-- tx_valid.json.h
  |   |   |-- dbwrapper_tests.cpp
-+|   |   |-- dbwrapper_tests.cpp.log
++|   |   |-- dbwrapper_tests.log
  |   |   |-- denialofservice_tests.cpp
-+|   |   |-- denialofservice_tests.cpp.log
++|   |   |-- denialofservice_tests.log
  |   |   |-- descriptor_tests.cpp
-+|   |   |-- descriptor_tests.cpp.log
++|   |   |-- descriptor_tests.log
  |   |   |-- flatfile_tests.cpp
-+|   |   |-- flatfile_tests.cpp.log
++|   |   |-- flatfile_tests.log
  |   |   |-- fs_tests.cpp
-+|   |   |-- fs_tests.cpp.log
++|   |   |-- fs_tests.log
  |   |   |-- fuzz
  |   |   |   |-- FuzzedDataProvider.h
  |   |   |   |-- addition_overflow.cpp
-@@ -2344,50 +2385,93 @@
+@@ -2348,50 +2389,93 @@
  |   |   |   |-- validation_load_mempool.cpp
  |   |   |   `-- versionbits.cpp
  |   |   |-- getarg_tests.cpp
-+|   |   |-- getarg_tests.cpp.log
++|   |   |-- getarg_tests.log
  |   |   |-- hash_tests.cpp
-+|   |   |-- hash_tests.cpp.log
++|   |   |-- hash_tests.log
  |   |   |-- i2p_tests.cpp
-+|   |   |-- i2p_tests.cpp.log
++|   |   |-- i2p_tests.log
  |   |   |-- interfaces_tests.cpp
-+|   |   |-- interfaces_tests.cpp.log
++|   |   |-- interfaces_tests.log
  |   |   |-- key_io_tests.cpp
-+|   |   |-- key_io_tests.cpp.log
++|   |   |-- key_io_tests.log
  |   |   |-- key_tests.cpp
-+|   |   |-- key_tests.cpp.log
++|   |   |-- key_tests.log
  |   |   |-- logging_tests.cpp
-+|   |   |-- logging_tests.cpp.log
++|   |   |-- logging_tests.log
  |   |   |-- main.cpp
  |   |   |-- mempool_tests.cpp
-+|   |   |-- mempool_tests.cpp.log
++|   |   |-- mempool_tests.log
  |   |   |-- merkle_tests.cpp
-+|   |   |-- merkle_tests.cpp.log
++|   |   |-- merkle_tests.log
  |   |   |-- merkleblock_tests.cpp
-+|   |   |-- merkleblock_tests.cpp.log
++|   |   |-- merkleblock_tests.log
  |   |   |-- miner_tests.cpp
-+|   |   |-- miner_tests.cpp.log
++|   |   |-- miner_tests.log
  |   |   |-- minisketch_tests.cpp
-+|   |   |-- minisketch_tests.cpp.log
++|   |   |-- minisketch_tests.log
  |   |   |-- multisig_tests.cpp
-+|   |   |-- multisig_tests.cpp.log
++|   |   |-- multisig_tests.log
  |   |   |-- net_peer_eviction_tests.cpp
-+|   |   |-- net_peer_eviction_tests.cpp.log
++|   |   |-- net_peer_eviction_tests.log
  |   |   |-- net_tests.cpp
-+|   |   |-- net_tests.cpp.log
++|   |   |-- net_tests.log
  |   |   |-- netbase_tests.cpp
-+|   |   |-- netbase_tests.cpp.log
++|   |   |-- netbase_tests.log
  |   |   |-- pmt_tests.cpp
-+|   |   |-- pmt_tests.cpp.log
++|   |   |-- pmt_tests.log
  |   |   |-- policy_fee_tests.cpp
-+|   |   |-- policy_fee_tests.cpp.log
++|   |   |-- policy_fee_tests.log
  |   |   |-- policyestimator_tests.cpp
-+|   |   |-- policyestimator_tests.cpp.log
++|   |   |-- policyestimator_tests.log
  |   |   |-- pow_tests.cpp
-+|   |   |-- pow_tests.cpp.log
++|   |   |-- pow_tests.log
  |   |   |-- prevector_tests.cpp
-+|   |   |-- prevector_tests.cpp.log
++|   |   |-- prevector_tests.log
  |   |   |-- raii_event_tests.cpp
-+|   |   |-- raii_event_tests.cpp.log
++|   |   |-- raii_event_tests.log
  |   |   |-- random_tests.cpp
-+|   |   |-- random_tests.cpp.log
++|   |   |-- random_tests.log
  |   |   |-- reverselock_tests.cpp
-+|   |   |-- reverselock_tests.cpp.log
++|   |   |-- reverselock_tests.log
  |   |   |-- rpc_tests.cpp
-+|   |   |-- rpc_tests.cpp.log
++|   |   |-- rpc_tests.log
  |   |   |-- sanity_tests.cpp
-+|   |   |-- sanity_tests.cpp.log
++|   |   |-- sanity_tests.log
  |   |   |-- scheduler_tests.cpp
-+|   |   |-- scheduler_tests.cpp.log

@maflcko
Copy link
Member

maflcko commented Mar 25, 2022

Out-of tree build:

  • (unrelated) Looks like ../share/rpcauth/ will initialize a pycache folder. This can be fixed in a follow-up
  • log files have the cpp. infix removed
  • log files are moved out-of tree
`tree` diff
diff --git a/tmp/1 b/tmp/2
index 8546e6a08..e7e05a939 100644
--- a/tmp/1
+++ b/tmp/2
@@ -1,7 +1,7 @@
-diff --git a/tmp/a b/tmp/b
-index a6e6e038b..fa13e37e7 100644
---- a/tmp/a
-+++ b/tmp/b
+diff --git a/tmp/c b/tmp/d
+index a6e6e038b..968ccb33d 100644
+--- a/tmp/c
++++ b/tmp/d
 @@ -357,7 +357,9 @@
  |   |   |   |   |   `-- libminisketch_clmul_a-clmul_8bytes.o
  |   |   |   |   |-- libminisketch_a-minisketch.o
@@ -13,7 +13,7 @@ index a6e6e038b..fa13e37e7 100644
  |   |   |-- node
  |   |   |   |-- libbitcoin_node_a-blockstorage.o
  |   |   |   |-- libbitcoin_node_a-caches.o
-@@ -426,14 +428,23 @@
+@@ -426,20 +428,52 @@
  |   |   |   |-- Makefile
  |   |   |   |-- config.log
  |   |   |   |-- config.status
@@ -42,15 +42,146 @@ index a6e6e038b..fa13e37e7 100644
  |   |   |-- support
  |   |   |   |-- libbitcoin_util_a-cleanse.o
  |   |   |   |-- libbitcoin_util_a-lockedpool.o
-@@ -662,6 +673,7 @@
- |   |   |       |-- libtest_util_a-transaction_utils.o
- |   |   |       |-- libtest_util_a-validation.o
- |   |   |       `-- libtest_util_a-wallet.o
+ |   |   |   |-- libbitcoinconsensus_la-cleanse.lo
+ |   |   |   `-- libbitcoinconsensus_la-cleanse.o
+ |   |   |-- test
++|   |   |   |-- addrman_tests.log
++|   |   |   |-- allocator_tests.log
++|   |   |   |-- amount_tests.log
++|   |   |   |-- arith_uint256_tests.log
++|   |   |   |-- banman_tests.log
++|   |   |   |-- base32_tests.log
++|   |   |   |-- base58_tests.log
++|   |   |   |-- base64_tests.log
++|   |   |   |-- bech32_tests.log
++|   |   |   |-- bip32_tests.log
++|   |   |   |-- blockchain_tests.log
++|   |   |   |-- blockencodings_tests.log
++|   |   |   |-- blockfilter_index_tests.log
++|   |   |   |-- blockfilter_tests.log
++|   |   |   |-- bloom_tests.log
++|   |   |   |-- bswap_tests.log
++|   |   |   |-- checkqueue_tests.log
++|   |   |   |-- coins_tests.log
++|   |   |   |-- coinstatsindex_tests.log
++|   |   |   |-- compilerbug_tests.log
++|   |   |   |-- compress_tests.log
++|   |   |   |-- crypto_tests.log
++|   |   |   |-- cuckoocache_tests.log
+ |   |   |   |-- data
+ |   |   |   |   |-- asmap.raw.h
+ |   |   |   |   |-- base58_encode_decode.json.h
+@@ -451,6 +485,11 @@
+ |   |   |   |   |-- sighash.json.h
+ |   |   |   |   |-- tx_invalid.json.h
+ |   |   |   |   `-- tx_valid.json.h
++|   |   |   |-- dbwrapper_tests.log
++|   |   |   |-- denialofservice_tests.log
++|   |   |   |-- descriptor_tests.log
++|   |   |   |-- flatfile_tests.log
++|   |   |   |-- fs_tests.log
+ |   |   |   |-- fuzz
+ |   |   |   |   |-- fuzz
+ |   |   |   |   |-- fuzz-addition_overflow.o
+@@ -560,6 +599,49 @@
+ |   |   |   |   |-- fuzz-versionbits.o
+ |   |   |   |   |-- libtest_fuzz_a-fuzz.o
+ |   |   |   |   `-- libtest_fuzz_a-util.o
++|   |   |   |-- getarg_tests.log
++|   |   |   |-- hash_tests.log
++|   |   |   |-- i2p_tests.log
++|   |   |   |-- interfaces_tests.log
++|   |   |   |-- key_io_tests.log
++|   |   |   |-- key_tests.log
++|   |   |   |-- logging_tests.log
++|   |   |   |-- mempool_tests.log
++|   |   |   |-- merkle_tests.log
++|   |   |   |-- merkleblock_tests.log
++|   |   |   |-- miner_tests.log
++|   |   |   |-- minisketch_tests.log
++|   |   |   |-- multisig_tests.log
++|   |   |   |-- net_peer_eviction_tests.log
++|   |   |   |-- net_tests.log
++|   |   |   |-- netbase_tests.log
++|   |   |   |-- pmt_tests.log
++|   |   |   |-- policy_fee_tests.log
++|   |   |   |-- policyestimator_tests.log
++|   |   |   |-- pow_tests.log
++|   |   |   |-- prevector_tests.log
++|   |   |   |-- raii_event_tests.log
++|   |   |   |-- random_tests.log
++|   |   |   |-- reverselock_tests.log
++|   |   |   |-- rpc_tests.log
++|   |   |   |-- sanity_tests.log
++|   |   |   |-- scheduler_tests.log
++|   |   |   |-- script_p2sh_tests.log
++|   |   |   |-- script_parse_tests.log
++|   |   |   |-- script_segwit_tests.log
++|   |   |   |-- script_standard_tests.log
++|   |   |   |-- script_tests.log
++|   |   |   |-- scriptnum_tests.log
++|   |   |   |-- serfloat_tests.log
++|   |   |   |-- serialize_tests.log
++|   |   |   |-- settings_tests.log
++|   |   |   |-- sighash_tests.log
++|   |   |   |-- sigopcount_tests.log
++|   |   |   |-- skiplist_tests.log
++|   |   |   |-- sock_tests.log
++|   |   |   |-- streams_tests.log
++|   |   |   |-- sync_tests.log
++|   |   |   |-- system_tests.log
+ |   |   |   |-- test_bitcoin
+ |   |   |   |-- test_bitcoin-addrman_tests.o
+ |   |   |   |-- test_bitcoin-allocator_tests.o
+@@ -651,17 +733,36 @@
+ |   |   |   |-- test_bitcoin-validation_tests.o
+ |   |   |   |-- test_bitcoin-validationinterface_tests.o
+ |   |   |   |-- test_bitcoin-versionbits_tests.o
+-|   |   |   `-- util
+-|   |   |       |-- libtest_util_a-blockfilter.o
+-|   |   |       |-- libtest_util_a-logging.o
+-|   |   |       |-- libtest_util_a-mining.o
+-|   |   |       |-- libtest_util_a-net.o
+-|   |   |       |-- libtest_util_a-script.o
+-|   |   |       |-- libtest_util_a-setup_common.o
+-|   |   |       |-- libtest_util_a-str.o
+-|   |   |       |-- libtest_util_a-transaction_utils.o
+-|   |   |       |-- libtest_util_a-validation.o
+-|   |   |       `-- libtest_util_a-wallet.o
++|   |   |   |-- timedata_tests.log
++|   |   |   |-- torcontrol_tests.log
++|   |   |   |-- transaction_tests.log
++|   |   |   |-- txindex_tests.log
++|   |   |   |-- txpackage_tests.log
++|   |   |   |-- txrequest_tests.log
++|   |   |   |-- txvalidation_tests.log
++|   |   |   |-- txvalidationcache_tests.log
++|   |   |   |-- uint256_tests.log
++|   |   |   |-- util
++|   |   |   |   |-- libtest_util_a-blockfilter.o
++|   |   |   |   |-- libtest_util_a-logging.o
++|   |   |   |   |-- libtest_util_a-mining.o
++|   |   |   |   |-- libtest_util_a-net.o
++|   |   |   |   |-- libtest_util_a-script.o
++|   |   |   |   |-- libtest_util_a-setup_common.o
++|   |   |   |   |-- libtest_util_a-str.o
++|   |   |   |   |-- libtest_util_a-transaction_utils.o
++|   |   |   |   |-- libtest_util_a-validation.o
++|   |   |   |   `-- libtest_util_a-wallet.o
++|   |   |   |-- util_tests.log
++|   |   |   |-- util_threadnames_tests.log
++|   |   |   |-- validation_block_tests.log
++|   |   |   |-- validation_chainstate_tests.log
++|   |   |   |-- validation_chainstatemanager_tests.log
++|   |   |   |-- validation_flush_tests.log
++|   |   |   |-- validation_tests.log
++|   |   |   |-- validationinterface_tests.log
++|   |   |   `-- versionbits_tests.log
 +|   |   |-- test-suite.log
  |   |   |-- univalue
  |   |   |   |-- lib
  |   |   |   |   |-- libunivalue_la-univalue.lo
-@@ -675,10 +687,16 @@
+@@ -675,10 +776,16 @@
  |   |   |   `-- test
  |   |   |       |-- no_nul
  |   |   |       |-- no_nul-no_nul.o
@@ -68,7 +199,7 @@ index a6e6e038b..fa13e37e7 100644
  |   |   |-- util
  |   |   |   |-- libbitcoin_consensus_a-strencodings.o
  |   |   |   |-- libbitcoin_util_a-asmap.o
-@@ -1208,6 +1226,8 @@
+@@ -1208,6 +1315,8 @@
  |   |   `-- extract_strings_qt.py
  |   |-- rpcauth
  |   |   |-- README.md
@@ -77,211 +208,6 @@ index a6e6e038b..fa13e37e7 100644
  |   |   `-- rpcauth.py
  |   `-- setup.nsi.in
  |-- src
-@@ -2405,28 +2425,51 @@
- |   |   |-- Makefile
- |   |   |-- README.md
- |   |   |-- addrman_tests.cpp
-+|   |   |-- addrman_tests.cpp.log
- |   |   |-- allocator_tests.cpp
-+|   |   |-- allocator_tests.cpp.log
- |   |   |-- amount_tests.cpp
-+|   |   |-- amount_tests.cpp.log
- |   |   |-- arith_uint256_tests.cpp
-+|   |   |-- arith_uint256_tests.cpp.log
- |   |   |-- banman_tests.cpp
-+|   |   |-- banman_tests.cpp.log
- |   |   |-- base32_tests.cpp
-+|   |   |-- base32_tests.cpp.log
- |   |   |-- base58_tests.cpp
-+|   |   |-- base58_tests.cpp.log
- |   |   |-- base64_tests.cpp
-+|   |   |-- base64_tests.cpp.log
- |   |   |-- bech32_tests.cpp
-+|   |   |-- bech32_tests.cpp.log
- |   |   |-- bip32_tests.cpp
-+|   |   |-- bip32_tests.cpp.log
- |   |   |-- blockchain_tests.cpp
-+|   |   |-- blockchain_tests.cpp.log
- |   |   |-- blockencodings_tests.cpp
-+|   |   |-- blockencodings_tests.cpp.log
- |   |   |-- blockfilter_index_tests.cpp
-+|   |   |-- blockfilter_index_tests.cpp.log
- |   |   |-- blockfilter_tests.cpp
-+|   |   |-- blockfilter_tests.cpp.log
- |   |   |-- bloom_tests.cpp
-+|   |   |-- bloom_tests.cpp.log
- |   |

@maflcko maflcko merged commit d261531 into bitcoin:master Mar 25, 2022
cut -d '(' -f 2 | cut -d ',' -f 1 | cut -d ')' -f 1\
)" -- DEBUG_LOG_OUT > $(abs_builddir)/$$(\
echo $< | grep -E -o "(wallet/test/.*\.cpp|test/.*\.cpp)" | $(SED) -e s/\.cpp/.log/\
) 2>&1 || (cat $<.log && false)
Copy link
Member

@luke-jr luke-jr Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is broken. It's still printing the old log file (which may not exist), not the new one. Included a fix in #16228.

@hebasto
Copy link
Member

hebasto commented Mar 30, 2022

Unfortunately, this is broken.

With the following diff:

--- a/src/test/addrman_tests.cpp
+++ b/src/test/addrman_tests.cpp
@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE(addrman_simple)
     CNetAddr source = ResolveIP("252.2.2.2");
 
     // Test: Does Addrman respond correctly when empty.
-    BOOST_CHECK_EQUAL(addrman->size(), 0U);
+    BOOST_CHECK_EQUAL(addrman->size(), 1U);
     auto addr_null = addrman->Select().first;
     BOOST_CHECK_EQUAL(addr_null.ToString(), "[::]:0");
 

one has

$ make check
...
Running tests: addrman_tests from test/addrman_tests.cpp
cat: test/addrman_tests.cpp.log: No such file or directory
...

@maflcko
Copy link
Member

maflcko commented Mar 30, 2022

The second commit of https://github.com/bitcoin/bitcoin/pull/16228/commits claims to fix this.

@hebasto
Copy link
Member

hebasto commented Mar 30, 2022

The second commit of https://github.com/bitcoin/bitcoin/pull/16228/commits claims to fix this.

Ok, let me look into it.

@hebasto
Copy link
Member

hebasto commented Mar 30, 2022

@MarcoFalke

The second commit of https://github.com/bitcoin/bitcoin/pull/16228/commits claims to fix this.

A fix suggested in #24715.

maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Mar 31, 2022
8b517fa build, refactor: Replace tabs with spaces (Hennadii Stepanov)
dc0774c build, test: Fix test logfile name (Hennadii Stepanov)

Pull request description:

  Recently merged bitcoin/bitcoin#19385 was flawed as it tries to `cat` a non-existed logfile:
  - bitcoin/bitcoin#19385 (comment)
  - bitcoin/bitcoin#19385 (comment)

  Closes bitcoin/bitcoin#17224.

ACKs for top commit:
  luke-jr:
    utACK 8b517fa

Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 2, 2022
f8cba0d test: Change default test logging directory (Yancy Ribbens)

Pull request description:

  This PR changes the default test log location request here: bitcoin#17224.  Instead of using the location of the makefile [automatic variable](https://www.gnu.org/software/make/manual/make.html#Automatic-Variables) `$<` I extract just the basename and then prepend a new location `./test`.  This is done because `$<` represents the variable name AND location of the prerequisite here.

Top commit has no ACKs.

Tree-SHA512: f0fbc530cf0e14c284b4bbf6671c145b1d7a2e1f5561f5c5d09f0cbe88b98e620e763bbbf2dfa9aeeec3dcc9b0127939e105e14c7e4f6660c7c19663622a393d
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 3, 2022
8b517fa build, refactor: Replace tabs with spaces (Hennadii Stepanov)
dc0774c build, test: Fix test logfile name (Hennadii Stepanov)

Pull request description:

  Recently merged bitcoin#19385 was flawed as it tries to `cat` a non-existed logfile:
  - bitcoin#19385 (comment)
  - bitcoin#19385 (comment)

  Closes bitcoin#17224.

ACKs for top commit:
  luke-jr:
    utACK 8b517fa

Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
achow101 added a commit that referenced this pull request Aug 11, 2022
5474f5c build: fix cleanup of test logs (fanquake)

Pull request description:

  `make clean` currently looks for `test_name.cpp.log`, when it should be `test_name.log`, meaning .log files are left after running `make clean`.

  Also fixes #21705. `make distcheck` seems to work fine after the logs files are properly cleaned up:
  ```bash
  ./autogen.sh && ./configure && make distcheck -j9
  ....
  make[1]: Leaving directory '/home/ubuntu/bitcoin/bitcoin-23.99.0/_build/sub'
  if test -d "bitcoin-23.99.0"; then find "bitcoin-23.99.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "bitcoin-23.99.0" || { sleep 5 && rm -rf "bitcoin-23.99.0"; }; else :; fi
  =================================================
  bitcoin-23.99.0 archives ready for distribution:
  bitcoin-23.99.0.tar.gz
  =================================================
  ```

  Probably broken in #19385 / #24715.

  Guix Build (x86_64):
  ```bash
  c33306c2ae55bc0e037a1050bd0813fd7654f21fefd0e7df089a541118b629bc  guix-build-5474f5c356c5/output/aarch64-linux-gnu/SHA256SUMS.part
  f3cf5b8366e27155f3a369ab0d017074912506c43b4010054a72e5c3ae8cab2c  guix-build-5474f5c356c5/output/aarch64-linux-gnu/bitcoin-5474f5c356c5-aarch64-linux-gnu-debug.tar.gz
  48f618300f63533c50c31395959737103bb0279972b989cc5417adbf338a5c9f  guix-build-5474f5c356c5/output/aarch64-linux-gnu/bitcoin-5474f5c356c5-aarch64-linux-gnu.tar.gz
  6b3e0ceefc84dfad48aec3a9ea8ae98a427775242370234709605855f593dc88  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/SHA256SUMS.part
  36a38f4d0d2d0fee51256ee9c610cde014055cf18b5b852c8b3235ef218b461e  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/bitcoin-5474f5c356c5-arm-linux-gnueabihf-debug.tar.gz
  3acb46a786323068fe34eaa8b2f7bff428d35367677e456b78fc00db09da8adf  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/bitcoin-5474f5c356c5-arm-linux-gnueabihf.tar.gz
  aaeb126cca3cbbb1d21be2cbb36b3e16a8c110199a5e61172ee55c9c913fb717  guix-build-5474f5c356c5/output/arm64-apple-darwin/SHA256SUMS.part
  0135d47c34dfbfbcd68181292fc810a1be4efaa0ff9fab05f9f33415167fc82c  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin-unsigned.dmg
  261ae9f70238ecbd8fedf9b3e02f34601abe42c4a23b25d0571d04d0881fdaba  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin-unsigned.tar.gz
  de716e0f425bae38cfda2690e86dbfa6831b6d37dd8a7638ca14334eecbddf99  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin.tar.gz
  2e2e1d5cd009ec5c69ce22124afe90ff8c15e9cb546df818b2305ff96efa9c81  guix-build-5474f5c356c5/output/dist-archive/bitcoin-5474f5c356c5.tar.gz
  85dd41584a2c7715b16508dff0f51bbb20b3891a1901a1781ecc37bc1cfd97c8  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/SHA256SUMS.part
  49ae951e9acb34fede0ead4d53679ddc041bfb6d60646efaca2a99cf87972be9  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/bitcoin-5474f5c356c5-powerpc64-linux-gnu-debug.tar.gz
  2efcb3fbb6702bff30bbf05d83b9849f390c67a1c363c883d71f365f4bee7ef6  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/bitcoin-5474f5c356c5-powerpc64-linux-gnu.tar.gz
  cea9e8e2499932ef6e20bba7a6b3408e2cca6fcd1875c1890293dd745add6942  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/SHA256SUMS.part
  7616659242a1f15b7d6f9f54382dfb52d0bbdca701e1fb3d48fbe7bb590e6213  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/bitcoin-5474f5c356c5-powerpc64le-linux-gnu-debug.tar.gz
  d9d4eeaf6f9d1272000aa598c8461afc330a8e65f263d45b0eab222f8ddfec71  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/bitcoin-5474f5c356c5-powerpc64le-linux-gnu.tar.gz
  f83ee11c35001d34f9fba7d1e9e201a4cc6fa5e44bd51e13dabffcb35324348c  guix-build-5474f5c356c5/output/riscv64-linux-gnu/SHA256SUMS.part
  c441e56f23f224122ed064cdb57364fb129f5c9d50c5e8173952ce649b46bdb8  guix-build-5474f5c356c5/output/riscv64-linux-gnu/bitcoin-5474f5c356c5-riscv64-linux-gnu-debug.tar.gz
  319db8af21a4d3c7bbdf54c315ad70bacf7fba1f2559408188d90c9ba60ca63c  guix-build-5474f5c356c5/output/riscv64-linux-gnu/bitcoin-5474f5c356c5-riscv64-linux-gnu.tar.gz
  9ac536a04d7e500f87b1f7dfb60e1e84cde2c192d3dffb89c308b864e9b9d583  guix-build-5474f5c356c5/output/x86_64-apple-darwin/SHA256SUMS.part
  19e70f13fb4bf82375f7ca882a23e831f84729278e643cf5911182bdababa893  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin-unsigned.dmg
  673a20e9457af3d0a89ea6721f84c6136132d3fbe469b7371bf14ce688b567d0  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin-unsigned.tar.gz
  74162d53faffc4372ae4587cde395fe078b5c440c43c5a4ad8b8b890e9546255  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin.tar.gz
  d751d50427d7abcbe9ac1daf087dc3addb7e4e6b90bb4c3ef6c31f8e54cac25e  guix-build-5474f5c356c5/output/x86_64-linux-gnu/SHA256SUMS.part
  49951b53172d4fe193d7ffc15b04a4bc058a3209653982b65912f2b221305dd4  guix-build-5474f5c356c5/output/x86_64-linux-gnu/bitcoin-5474f5c356c5-x86_64-linux-gnu-debug.tar.gz
  93d4c4b07202a9171a72b6887e3931e53b3a8c22433b26521e2cb2a0c942f52a  guix-build-5474f5c356c5/output/x86_64-linux-gnu/bitcoin-5474f5c356c5-x86_64-linux-gnu.tar.gz
  b4b79e3578b6ffbb3075aacff969fb201b386e35a2d9d597047b61ff14bdfbfb  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/SHA256SUMS.part
  8260f5c9a38cc577dff2143f00c465d117aa9835b3633365289d6807d7e46e7c  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-debug.zip
  b20fbf02ddf617b86e5d5f88346ed97f9d169cd56904684ba3ca5f03ea85f008  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-setup-unsigned.exe
  16e9d1b817a832bfb0be2b9065440245a5d04b3aae8e34ff0f43f20c5dd7047f  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-unsigned.tar.gz
  da766e257d10cf8890a530babc6100039c69ae7ed8e4f969eb612b4a411dd88f  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64.zip
  ```

ACKs for top commit:
  adam2k:
    ACK 5474f5c
  achow101:
    ACK 5474f5c
  jarolrod:
    ACK 5474f5c

Tree-SHA512: d5595c96d0386b5ee9b98d9499770a00d8b751500020bf92f75c88e688640a50cfa5ebe7c26dea8cc5473b16a6adb83ec39891dd18d32ef59df5cf48d7091d6c
@bitcoin bitcoin locked and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants