aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2020-11-25 17:33:25 +0000
committerGitHub <noreply@github.com>2020-11-25 17:33:25 +0000
commit76fb4e20298c7c41efb20a8a53ae81d2ce716303 (patch)
tree2055c804d241b4dd366d5c5ae1ee5be98761389c /Makefile
parent48c55b26a05ab8d4bf7afdfed98bd8a71142848f (diff)
downloadlibvfio-user-76fb4e20298c7c41efb20a8a53ae81d2ce716303.zip
libvfio-user-76fb4e20298c7c41efb20a8a53ae81d2ce716303.tar.gz
libvfio-user-76fb4e20298c7c41efb20a8a53ae81d2ce716303.tar.bz2
add "make test"; run it in pre-commit (#127)
Also rename test.c to reflect it should cover unit tests. Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Signed-off-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 9e9f04b..872c975 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,9 @@ PHONY_TARGETS := all realclean buildclean force_cmake export install-export tags
all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile
+$(MAKE) -C $(BUILD_DIR) $@
+test: all
+ cd $(BUILD_DIR)/test; ctest --verbose
+
realclean:
rm -rf $(BUILD_DIR_BASE)