Skip to content

Commit

Permalink
autotools: group test scripts in check_SCRIPTS
Browse files Browse the repository at this point in the history
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 ceph#6274

Reviewed-by: Roald J. van Loon <[email protected]>
Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
Loic Dachary committed Sep 23, 2013
1 parent 0eb0c3e commit ee33ff8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Makefile-env.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 4 additions & 0 deletions src/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ee33ff8

Please sign in to comment.