diff options
author | John Levon <john.levon@nutanix.com> | 2020-12-02 12:20:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 12:20:45 +0000 |
commit | 96d4f11b562159033661ebb9dc7f260274a8ac79 (patch) | |
tree | eb7e9d9e255e32cd79342eb7bd5384fe41c4c624 | |
parent | 96716ea7e47aedb769336730f2eee0adb99e5b85 (diff) | |
download | libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.zip libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.tar.gz libvfio-user-96d4f11b562159033661ebb9dc7f260274a8ac79.tar.bz2 |
add pre-push target (#150)
Add a target that builds in debug and release mode and runs the tests in each.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | Makefile | 9 |
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 @@ -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) |