summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Dachary <loic@dachary.org>2013-09-11 18:14:23 +0200
committerLoic Dachary <loic@dachary.org>2013-09-23 23:46:43 +0200
commitee33ff81f8168b81f3340cb22c47dc88bf879fe2 (patch)
tree5e2b3f56fa3ced4103d49d80a90611041ff27df8
parent0eb0c3e0f3d7f8d32eb0cdf4abaf40d9fdb4d0a3 (diff)
downloadceph-ee33ff81f8168b81f3340cb22c47dc88bf879fe2.tar.gz
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 <roaldvanloon@gmail.com> Signed-off-by: Loic Dachary <loic@dachary.org>
-rw-r--r--src/Makefile-env.am6
-rw-r--r--src/Makefile.am5
-rw-r--r--src/test/Makefile.am4
3 files changed, 13 insertions, 2 deletions
diff --git a/src/Makefile-env.am b/src/Makefile-env.am
index 900998702f5..151ddbd3b93 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 ed07a91e3ae..5e745a0573f 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 647aad3550d..e0ac1369568 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)