Fix testing setup
There were some problems with the existing testing setup: - Makefile rules for test-file compilation used CFLAGS instead of CXXFLAGS in makefile.unix
This commit is contained in:
parent
02962ba848
commit
e707d29dd6
7 changed files with 20 additions and 6 deletions
|
@ -90,7 +90,7 @@ bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
|
||||||
obj/test/%.o: obj/test/%.cpp $(HEADERS)
|
obj/test/%.o: obj/test/%.cpp $(HEADERS)
|
||||||
i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
|
i586-mingw32msvc-g++ -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
test_bitcoin.exe: obj/test/test_bitcoin.o
|
test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
||||||
i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
|
i586-mingw32msvc-g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework-mt-s
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ bitcoind.exe: $(OBJS:obj/%=obj/nogui/%) obj/ui_res.o
|
||||||
obj/test/%.o: obj/test/%.cpp $(HEADERS)
|
obj/test/%.o: obj/test/%.cpp $(HEADERS)
|
||||||
g++ -c $(CFLAGS) -o $@ $<
|
g++ -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
test_bitcoin: obj/test/test_bitcoin.o
|
test_bitcoin.exe: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
||||||
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -79,7 +79,7 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%)
|
||||||
obj/test/%.o: test/%.cpp $(HEADERS)
|
obj/test/%.o: test/%.cpp $(HEADERS)
|
||||||
$(CXX) -c $(CFLAGS) -o $@ $<
|
$(CXX) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
test_bitcoin: obj/test/test_bitcoin.o
|
test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
||||||
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
|
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -78,10 +78,10 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%)
|
||||||
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
|
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
obj/test/%.o: test/%.cpp $(HEADERS)
|
obj/test/%.o: test/%.cpp $(HEADERS)
|
||||||
$(CXX) -c $(CFLAGS) -o $@ $<
|
$(CXX) -c $(CXXFLAGS) -o $@ $<
|
||||||
|
|
||||||
test_bitcoin: obj/test/test_bitcoin.o
|
test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
||||||
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS) -lboost_unit_test_framework
|
$(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f bitcoin bitcoind test_bitcoin
|
-rm -f bitcoin bitcoind test_bitcoin
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
#define BOOST_TEST_MODULE uint160
|
#define BOOST_TEST_MODULE uint160
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
|
#include "../main.h"
|
||||||
|
#include "../wallet.h"
|
||||||
|
|
||||||
#include "uint160_tests.cpp"
|
#include "uint160_tests.cpp"
|
||||||
#include "uint256_tests.cpp"
|
#include "uint256_tests.cpp"
|
||||||
|
|
||||||
|
|
||||||
|
CWallet* pwalletMain;
|
||||||
|
|
||||||
|
void Shutdown(void* parg)
|
||||||
|
{
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include "../uint256.h"
|
#include "../uint256.h"
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE(uint160_tests)
|
BOOST_AUTO_TEST_SUITE(uint160_tests)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include "../uint256.h"
|
#include "../uint256.h"
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE(uint256_tests)
|
BOOST_AUTO_TEST_SUITE(uint256_tests)
|
||||||
|
|
Loading…
Reference in a new issue