]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
autotools: group test scripts in check_SCRIPTS
authorLoic Dachary <loic@dachary.org>
Wed, 11 Sep 2013 16:14:23 +0000 (18:14 +0200)
committerLoic Dachary <loic@dachary.org>
Mon, 23 Sep 2013 21:46:43 +0000 (23:46 +0200)
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 <roaldvanloon@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
src/Makefile-env.am
src/Makefile.am
src/test/Makefile.am

index 900998702f5131ec5b157b83f5533f4b33f2543c..151ddbd3b93efb6a8e30028220328c8993c92e7c 100644 (file)
@@ -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)
index ed07a91e3ae5da5630d3e40eb47883197cc37829..5e745a0573f08a6cad1b4abe735bd7da18b89bf3 100644 (file)
@@ -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
 
 
index 647aad3550d71f58bfcd149fb683bada1529f47b..e0ac1369568a9720f237741b79e2ef79ebd47f9a 100644 (file)
@@ -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)