From 8f09e4cac48005af431f1c341060e11130f41422 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Tue, 18 Sep 2012 11:38:19 -0400 Subject: [PATCH] Give makefiles 'test' and 'check' targets to compile and run unit tests --- src/makefile.mingw | 5 +++++ src/makefile.osx | 3 +++ src/makefile.unix | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/makefile.mingw b/src/makefile.mingw index 55c5b7e387..9bbd739365 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -83,6 +83,9 @@ OBJS= \ all: bitcoind.exe +test check: test_bitcoin.exe FORCE + test_bitcoin.exe + obj/%.o: %.cpp $(HEADERS) g++ -c $(CFLAGS) -o $@ $< @@ -102,3 +105,5 @@ clean: -del /Q obj\* -del /Q obj-test\* -del /Q build.h + +FORCE: diff --git a/src/makefile.osx b/src/makefile.osx index 2666caa918..547f751aba 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -116,6 +116,9 @@ endif all: bitcoind +test check: test_bitcoin FORCE + ./test_bitcoin + # auto-generated dependencies: -include obj/*.P -include obj-test/*.P diff --git a/src/makefile.unix b/src/makefile.unix index 37a1917973..6f8f96e3af 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -132,6 +132,9 @@ OBJS= \ all: bitcoind +test check: test_bitcoin FORCE + ./test_bitcoin + # auto-generated dependencies: -include obj/*.P -include obj-test/*.P