From 57ccacee54e77955ebe20d52e06934850e182adc Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 24 Jun 2011 17:59:04 -0700 Subject: [PATCH] Fix common test usage, and merge in additional document changes. --- docs/conf.py.in | 2 +- docs/include.am | 30 +++++++++++++++--------------- tests/atomsmasher.cc | 3 +-- tests/basic.cc | 4 ++-- tests/cpp_example.cc | 1 + tests/deprecated.cc | 3 +-- tests/error_conditions.cc | 4 +--- tests/hash_plus.cc | 4 +--- tests/hashkit_functions.cc | 4 +--- tests/mem_functions.cc | 3 +-- tests/mem_udp.cc | 5 ++--- tests/parser.cc | 4 +--- tests/pool.cc | 4 +--- tests/print.cc | 3 +-- tests/replication.cc | 5 ++--- tests/start.cc | 2 +- tests/string.cc | 3 +++ tests/virtual_buckets.cc | 3 +-- 18 files changed, 37 insertions(+), 50 deletions(-) diff --git a/docs/conf.py.in b/docs/conf.py.in index 44f3f420..c27cd5c2 100644 --- a/docs/conf.py.in +++ b/docs/conf.py.in @@ -239,7 +239,6 @@ man_pages = [ ('libmemcached_configuration', 'memcached', u'libmemcached Documentation', [u'Brian Aker'], 3), ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3), ('libmemcachedutil', 'libmemcachedutil', u'libmemcached Documentation', [u'Brian Aker'], 3), - ('memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1), ('memcached_analyze', 'memcached_analyze', u'libmemcached Documentation', [u'Brian Aker'], 3), ('memcached_append', 'memcached_append', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), ('memcached_append', 'memcached_append_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), @@ -345,6 +344,7 @@ man_pages = [ ('bin/memerror', 'memerror', u'libmemcached Documentation', [u'Brian Aker'], 1), ('bin/memflush', 'memflush', u'libmemcached Documentation', [u'Brian Aker'], 1), ('bin/memrm', 'memrm', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1), ('bin/memslap', 'memslap', u'libmemcached Documentation', [u'Brian Aker'], 1), ('bin/memstat', 'memstat', u'libmemcached Documentation', [u'Brian Aker'], 1), ] diff --git a/docs/include.am b/docs/include.am index 022b218b..d8c036d7 100644 --- a/docs/include.am +++ b/docs/include.am @@ -144,38 +144,38 @@ sphinx-help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" -html-local: +html-local: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/html." -dirhtml: +dirhtml: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(SPHINX_BUILDDIR)/dirhtml." -singlehtml: +singlehtml: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(SPHINX_BUILDDIR)/singlehtml." -pickle: +pickle: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." -json: +json: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." -htmlhelp: +htmlhelp: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp." -qthelp: +qthelp: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ @@ -184,7 +184,7 @@ qthelp: @echo "To view the help file:" @echo "# assistant -collectionFile $(SPHINX_BUILDDIR)/qthelp/Libmemcached.qhc" -devhelp: +devhelp: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/devhelp @echo @echo "Build finished." @@ -193,40 +193,40 @@ devhelp: @echo "# ln -s $(SPHINX_BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Libmemcached" @echo "# devhelp" -epub: +epub: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub." -latex: +latex: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." -latexpdf: latex +latexpdf: latex changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." make -C $(SPHINX_BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex." -text: +text: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text @echo @echo "Build finished. The text files are in $(SPHINX_BUILDDIR)/text." -man: +man: docs/conf.py changes PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(SPHINX_BUILDDIR)/man." -changes: +changes: docs/conf.py linkcheck PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes @echo @echo "The overview file is in $(SPHINX_BUILDDIR)/changes." -linkcheck: +linkcheck: docs/conf.py PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ diff --git a/tests/atomsmasher.cc b/tests/atomsmasher.cc index a525b95e..af692c6b 100644 --- a/tests/atomsmasher.cc +++ b/tests/atomsmasher.cc @@ -12,7 +12,7 @@ /* Sample test application. */ -#include "config.h" +#include #include #include @@ -30,7 +30,6 @@ #include #include -#include /* Number of items generated for tests */ #define GLOBAL_COUNT 100000 diff --git a/tests/basic.cc b/tests/basic.cc index 8f57e4c5..666fa4d6 100644 --- a/tests/basic.cc +++ b/tests/basic.cc @@ -35,11 +35,11 @@ * */ +#include + #include #include -#include - #include "tests/basic.h" #include diff --git a/tests/cpp_example.cc b/tests/cpp_example.cc index fd0b00f4..f84af759 100644 --- a/tests/cpp_example.cc +++ b/tests/cpp_example.cc @@ -1,6 +1,7 @@ /* * An example file showing the usage of the C++ libmemcached interface. */ +#include #include #include diff --git a/tests/deprecated.cc b/tests/deprecated.cc index eebc7d06..bf0e0c6d 100644 --- a/tests/deprecated.cc +++ b/tests/deprecated.cc @@ -35,11 +35,10 @@ * */ -#include +#include #include -#include #include #include diff --git a/tests/error_conditions.cc b/tests/error_conditions.cc index 09a01eb4..ad4e2c83 100644 --- a/tests/error_conditions.cc +++ b/tests/error_conditions.cc @@ -35,15 +35,13 @@ * */ -#include +#include #define BUILDING_LIBMEMCACHED #include #include -#include - #include test_return_t memcached_increment_MEMCACHED_NO_SERVERS(memcached_st *) diff --git a/tests/hash_plus.cc b/tests/hash_plus.cc index e3130786..aa38a865 100644 --- a/tests/hash_plus.cc +++ b/tests/hash_plus.cc @@ -2,9 +2,7 @@ C++ to libhashkit */ -#include - -#include +#include #include #include diff --git a/tests/hashkit_functions.cc b/tests/hashkit_functions.cc index 98396df5..42abcb62 100644 --- a/tests/hashkit_functions.cc +++ b/tests/hashkit_functions.cc @@ -35,7 +35,7 @@ * */ -#include "config.h" +#include #include #include @@ -44,8 +44,6 @@ #include -#include - #include "hash_results.h" static hashkit_st global_hashk; diff --git a/tests/mem_functions.cc b/tests/mem_functions.cc index c1bb70fe..ba496f32 100644 --- a/tests/mem_functions.cc +++ b/tests/mem_functions.cc @@ -35,6 +35,7 @@ * */ +#include /* Test cases @@ -44,8 +45,6 @@ // !NEVER use common.h, always use memcached.h in your own apps #include -#include - #include #include #include diff --git a/tests/mem_udp.cc b/tests/mem_udp.cc index 8153e8ef..2a82482f 100644 --- a/tests/mem_udp.cc +++ b/tests/mem_udp.cc @@ -10,9 +10,9 @@ Sample test application. */ -#include "config.h" +#include -#include "libmemcached/common.h" +#include #include #include @@ -27,7 +27,6 @@ #include #include -#include #define SERVERS_TO_CREATE 5 diff --git a/tests/parser.cc b/tests/parser.cc index ad602048..31bcf9b0 100644 --- a/tests/parser.cc +++ b/tests/parser.cc @@ -35,7 +35,7 @@ * */ -#include +#include #include #include @@ -43,8 +43,6 @@ #include #include -#include - #define BUILDING_LIBMEMCACHED // !NEVER use common.h, always use memcached.h in your own apps #include diff --git a/tests/pool.cc b/tests/pool.cc index 9e1d94f7..8f2a1587 100644 --- a/tests/pool.cc +++ b/tests/pool.cc @@ -35,9 +35,7 @@ * */ -#include - -#include +#include #include #include diff --git a/tests/print.cc b/tests/print.cc index b3c8d066..f4e597f3 100644 --- a/tests/print.cc +++ b/tests/print.cc @@ -35,12 +35,11 @@ * */ -#include +#include #include #include -#include #include "tests/print.h" diff --git a/tests/replication.cc b/tests/replication.cc index 3e4476c5..330f7bf7 100644 --- a/tests/replication.cc +++ b/tests/replication.cc @@ -35,10 +35,9 @@ * */ -#include +#include -#include -#include "libmemcached/common.h" +#include #include test_return_t replication_set_test(memcached_st *memc) diff --git a/tests/start.cc b/tests/start.cc index 1f5d43e2..6ea0e47d 100644 --- a/tests/start.cc +++ b/tests/start.cc @@ -9,7 +9,7 @@ * */ -#include "config.h" +#include #include #include diff --git a/tests/string.cc b/tests/string.cc index 4048d91c..ea7ba592 100644 --- a/tests/string.cc +++ b/tests/string.cc @@ -35,6 +35,9 @@ * */ +// We let libmemcached/common.h define config since we are looking at +// library internals. + #define BUILDING_LIBMEMCACHED #include diff --git a/tests/virtual_buckets.cc b/tests/virtual_buckets.cc index 1714600e..9ae7d6f1 100644 --- a/tests/virtual_buckets.cc +++ b/tests/virtual_buckets.cc @@ -35,9 +35,8 @@ * */ -#include +#include -#include #include #include -- 2.30.2