When doing out-of-tree builds it’s not expected that the build (or tests) clutter the source path. All build output should be written to the build path (the current directory when configure
is run) and subdirectories of that.
(theoretically it should even be possible to have the source on a read-only mount, but that’s not really important imo, the point is to not clutter the git repository with build output)
However, after running make check
there will be a while slew of *.log files in the source directory:
0bitcoin$ ./autogen.sh
1bitcoin$ make build
2bitcoin$ cd build
3bitcoin/build$ ../configure ...
4bitcoin/build$ make check
5bitcoin/build$ cd ..
6bitcoin$ ls src/test/*.log
7src/test/addrman_tests.cpp.log src/test/compress_tests.cpp.log src/test/netbase_tests.cpp.log src/test/sigopcount_tests.cpp.log
8src/test/allocator_tests.cpp.log src/test/crypto_tests.cpp.log src/test/net_tests.cpp.log src/test/skiplist_tests.cpp.log
9src/test/amount_tests.cpp.log src/test/cuckoocache_tests.cpp.log src/test/pmt_tests.cpp.log src/test/streams_tests.cpp.log
10src/test/arith_uint256_tests.cpp.log src/test/dbwrapper_tests.cpp.log src/test/policyestimator_tests.cpp.log src/test/sync_tests.cpp.log
11...
Either these files should be written to a temporary path (like the other test output), or to the build directory.