From 6159c33125f8ee82e88d495ea2aa5d00018ea844 Mon Sep 17 00:00:00 2001 From: Fabiano Fidêncio Date: Aug 29 2016 13:43:11 +0000 Subject: BUILD: Add a few more targets for intg tests Running "make intgcheck" has been proven to be a bit painful (mainly when the developer is just writing down a single test case), as it cleans up the build directory and fireis a new build before, finally, run the tests. In order to make it a little less painful, let's break the whole operation into 3 new targets: intgcheck-{prepare,run,clean}. As expected, "make intgcheck" calls these 3 new operations in the same order they were presented, not changing then the current behavior. Each operation will trigger the previous one in case there is no "$$prefix" directory created and the directory is _only_ created in the very first operation (intghcheck-prepare). A note must be done about how to run a simple test file or a simple test from a test file when running "make intgcheck-run". The option always been here but only makes sense now that we have the intgcheck split in a few useful steps. See the examples below (and for more detailed information, check the py.test documentation): #Run a single file make intgcheck-run INTGCHECK_PYTEST_ARGS="-k test_netgroup.py" #Run a single test from a single file make intgcheck-run INTGCHECK_PYTEST_ARGS="-k test_add_empty_netgroup" Signed-off-by: Fabiano Fidêncio Reviewed-by: Lukáš Slebodník --- diff --git a/Makefile.am b/Makefile.am index 6219682..6299ac7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3076,7 +3076,7 @@ endif # Integration tests # ##################### -intgcheck: +intgcheck-prepare: echo "temporarily disabled" set -e; \ rm -Rf intg; \ @@ -3096,10 +3096,23 @@ intgcheck: $(MAKE) $(AM_MAKEFLAGS) -j1 install; \ : Remove .la files from LDB module directory to avoid loader warnings; \ rm "$$prefix"/lib/ldb/*.la; \ + cd ../.. + +intgcheck-run: + if [ ! -d intg/pfx ]; then $(MAKE) intgcheck-build; fi; \ + cd intg/bld; \ $(MAKE) $(AM_MAKEFLAGS) -C src/tests/intg intgcheck-installed; \ - cd ../..; \ + cd ../.. + +intgcheck-clean: + prefix=`readlink -e intg/pfx`; \ rm -Rf "$$prefix" intg +intgcheck: + $(MAKE) intgcheck-prepare + $(MAKE) intgcheck-run + $(MAKE) intgcheck-clean + #################### # Client Libraries # ####################