From 9a3ae9e00405501c964b489ac3415482ba3b3974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 18 Aug 2016 16:24:17 +0200 Subject: [PATCH 21/39] BUILD: Add a few more targets for intg tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 6159c33125f8ee82e88d495ea2aa5d00018ea844) --- Makefile.am | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6219682de0d1fd4b3a813ee2f95b8185531e62bf..6299ac7a7bf1c2ed41dfeeda7063c8901214941a 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 # #################### -- 2.9.3