From: Loic Dachary Date: Wed, 11 Sep 2013 16:14:23 +0000 (+0200) Subject: autotools: group test scripts in check_SCRIPTS X-Git-Tag: v0.71~89^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ee33ff81f8168b81f3340cb22c47dc88bf879fe2;p=ceph.git autotools: group test scripts in check_SCRIPTS The check_SCRIPTS is added in Makefile-env.am to list the tests that do not require compilation. The scripts listed in check-local and in the TESTS variable use check_SCRIPTS instead. The PYTHONPATH environment variable is added to Makefile-env.am and includes the pybind directory so that python unit tests can load the libraries from sources. http://tracker.ceph.com/issues/6274 refs #6274 Reviewed-by: Roald J. van Loon Signed-off-by: Loic Dachary --- diff --git a/src/Makefile-env.am b/src/Makefile-env.am index 900998702f51..151ddbd3b93e 100644 --- a/src/Makefile-env.am +++ b/src/Makefile-env.am @@ -26,6 +26,12 @@ ceph_sbindir = $(exec_prefix)$(sbindir) # C/C++ tests to build will be appended to this check_PROGRAMS = +# tests scripts will be appended to this +check_SCRIPTS = + +# python unit tests need to know where the scripts are located +export PYTHONPATH=$(top_srcdir)/src/pybind + # when doing a debug build, make sure to make the targets if WITH_DEBUG bin_PROGRAMS += $(bin_DEBUGPROGRAMS) diff --git a/src/Makefile.am b/src/Makefile.am index ed07a91e3ae5..5e745a0573f0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -251,10 +251,11 @@ shell_scripts += init-ceph mkcephfs # executables built, you need to replace this with manual assignments # target by target -TESTS = $(check_PROGRAMS) unittest_bufferlist.sh +TESTS = \ + $(check_PROGRAMS) \ + $(check_SCRIPTS) check-local: - $(srcdir)/test/encoding/check-generated.sh $(srcdir)/test/encoding/readable.sh ../ceph-object-corpus diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 647aad3550d7..e0ac1369568a 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -228,6 +228,10 @@ bin_DEBUGPROGRAMS += ceph_bench_log ## Unit tests +check_SCRIPTS += \ + $(srcdir)/unittest_bufferlist.sh \ + $(srcdir)/test/encoding/check-generated.sh + # target to build but not run the unit tests unittests:: $(check_PROGRAMS)