aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--Makefile9
2 files changed, 7 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index a75abce..2e300c0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,4 @@ compiler: gcc
before_install:
- sudo apt-get -y install libjson-c-dev libcmocka-dev
script:
- - make
- - make BUILD_TYPE=rel
- - make test
+ - make pre-push
diff --git a/Makefile b/Makefile
index 872c975..4375c57 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ else
endif
ifeq ($(VERBOSE),)
- MAKEFLAGS += -s
+ MAKEFLAGS += -s
endif
BUILD_DIR_BASE = $(CURDIR)/build
@@ -46,8 +46,7 @@ BUILD_DIR = $(BUILD_DIR_BASE)/$(BUILD_TYPE)
INSTALL_PREFIX ?= /usr/local
-PHONY_TARGETS := all realclean buildclean force_cmake export install-export tags
-
+PHONY_TARGETS := all test pre-push realclean buildclean force_cmake tags
.PHONY: $(PHONY_TARGETS)
all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile
@@ -56,6 +55,10 @@ all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile
test: all
cd $(BUILD_DIR)/test; ctest --verbose
+pre-push: realclean
+ make test
+ make test BUILD_TYPE=rel
+
realclean:
rm -rf $(BUILD_DIR_BASE)