I would like to help everyone here who builds bitcoin be able to work on issues. This means being able to establish a baseline (get latest stable code, run all tests, and see them pass). Toward this end, I wanted to make a patch to get around this problem:
-hexdump
To generate test data an hexdump like program is needed.
Download and unpack
https://github.com/wahern/hexdump then compile hexdump.exe by running:
gcc -std=gnu99 -g -O2 -Wall -Wextra -Werror -Wno-unused-variable -Wno-unused-parameter hexdump.c -DHEXDUMP_MAIN -o hexdump.exe
Do not forget to add hexdump folder to your PATH environment variable.
-bitcoin
In order to work with the previously compiled hexdump version Makefile must be patched (src/Makefile.test.include if v0.10, src/Makefile.include if v0.9):
--- src/Makefile.test.include Tue Dec 23 20:14:37 2014
+++ src/Makefile.test.include Sat Jan 10 16:53:56 2015
@@ -111,7 +111,7 @@
@$(MKDIR_P) $(@D)
@echo "namespace json_tests{" > $@
@echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @$(HEXDUMP) -e '8/1 "0x%02x, "' $< | $(SED) -e 's/0x ,//g' >> $@
@echo "};};" >> $@
@echo "Generated $@"
@@ -119,6 +119,6 @@
@$(MKDIR_P) $(@D)
@echo "namespace alert_tests{" > $@
@echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
+ @$(HEXDUMP) -e '8/1 "0x%02x, "' $< | $(SED) -e 's/0x ,//g' >> $@
@echo "};};" >> $@
@echo "Generated $@"
I failed to establish a baseline myself, though, and ran into some trouble in working on that. cfields_ in #bitcoin-dev suggested that
make bitcoin_test_clean && make check
is the best way to do that. I found that this only works from bitcoin/src, though the ./configure and make commands to build are executed from bitcoin/. I will remove my changes and try that, but with my changes, make check produces this output:
Dave@WindowsCompiler /c/bitcoin/src/qt/test
$ make check
make -C ../../ test_bitcoin_qt_check
make[1]: Entering directory `/c/bitcoin/src'
make[2]: Entering directory `/c/bitcoin/src/secp256k1'
make[2]: Leaving directory `/c/bitcoin/src/secp256k1'
make check-TESTS TESTS=qt/test/test_bitcoin-qt.exe FORCE
make[2]: Entering directory `/c/bitcoin/src'
make[3]: Entering directory `/c/bitcoin/src/secp256k1'
make[3]: Leaving directory `/c/bitcoin/src/secp256k1'
FAIL: qt/test/test_bitcoin-qt.exe
=================================
1 of 1 test failed
Please report to info@bitcoin.org
=================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/c/bitcoin/src'
make[1]: *** [test_bitcoin_qt_check] Error 2
make[1]: Leaving directory `/c/bitcoin/src'
make: *** [check] Error 2
No log file is generated in src or any subfolder of it. I ran src/qt/test/test_bitcoin-qt.exe and got no output and no log file. Any advice would be appreciated.