diff options
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/examples/Makefile.am | 16 | ||||
| -rwxr-xr-x | qpid/cpp/examples/verify_all | 23 |
2 files changed, 21 insertions, 18 deletions
diff --git a/qpid/cpp/examples/Makefile.am b/qpid/cpp/examples/Makefile.am index 54c59810ed..739110de34 100644 --- a/qpid/cpp/examples/Makefile.am +++ b/qpid/cpp/examples/Makefile.am @@ -64,18 +64,10 @@ all-local: test -d examples || cp -R $(srcdir)/examples . cd examples && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) -I$(abs_top_srcdir)/src -I$(abs_top_srcdir)/src/gen -I$(abs_top_builddir)/src -I$(abs_top_builddir)/src/gen -L$(abs_top_builddir)/src/.libs -Wl,-rpath,$(abs_top_builddir)/src/.libs" all +if !HAVE_XML +exclude_examples_regexp="xml" # Exclude XML examples. +endif + # Verify the examples in the buid tree. check-local: all-local verify $(srcdir)/verify_all $(abs_top_srcdir)/.. - -# TODO: -# create a tarball for testing installed examples. -# installcheck-local to use the tarball on installed example and clean up after. -# Build and verify installed C++ examples, clean up to avoid rpmbuild warnings. -# EXAMPLE_FLAGS=-I$(DESTDIR)$(includedir) -L$(DESTDIR)$(libdir) -Wl,-rpath,$(DESTDIR)$(libdir) -# EXAMPLE_DIR=$(DESTDIR)$(pkgdatadir)/examples/cpp -# installcheck-local: -# cd $(EXAMPLE_DIR) && $(MAKE) CXX="$(CXX)" CXXFLAGS="$(EXAMPLE_FLAGS)" all -# cd $(EXAMPLE_DIR) && QPIDD=$(sbindir)/qpidd $(srcdir)/verify * -# cd $(EXAMPLE_DIR) && $(MAKE) clean - diff --git a/qpid/cpp/examples/verify_all b/qpid/cpp/examples/verify_all index 427a46f5be..0fc1625355 100755 --- a/qpid/cpp/examples/verify_all +++ b/qpid/cpp/examples/verify_all @@ -2,16 +2,19 @@ # Verify all C++/python example combinations. # -srcdir=$1 ; verify=`dirname $0`/verify -qpidd=../src/qpidd -python=$srcdir/python - +topdir=$1 +exclude_regexp=$2 + + +qpidd=$topdir/cpp/src/qpidd +python=$topdir/python + trap "$qpidd -q" exit export QPID_PORT=`$qpidd -dp0 --data-dir "" --auth no` export PYTHON_EXAMPLES=$python/examples export PYTHONPATH=$python:$PYTHONPATH -export AMQP_SPEC=$srcdir/specs/amqp.0-10.xml +export AMQP_SPEC=$topdir/specs/amqp.0-10.xml test -d $PYTHON_EXAMPLES || echo "Warning: not verifying python examples, $PYTHON_EXAMPLES not found" find="find examples" @@ -19,5 +22,13 @@ test -d $PYTHON_EXAMPLES && find="$find $PYTHON_EXAMPLES" find="$find -name verify" test -d $PYTHON_EXAMPLES && \ find="$find -o -name verify_cpp_python -o -name verify_python_cpp" -$verify `$find` +all_examples=`$find` +if test -z "$exclude_regexp"; then + run_examples=$all_examples +else + for f in $all_examples; do + { cat $f | grep $exclude_regexp > /dev/null ; } || run_examples="$run_examples $f" + done +fi +$verify $run_examples |
