Move HPACK tools from hdtest to src

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-10 21:53:48 +09:00
parent 25a6596e77
commit 0f1dea4f42
10 changed files with 32 additions and 59 deletions

View File

@ -20,7 +20,7 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
SUBDIRS = lib src examples hdtest python tests doc SUBDIRS = lib src examples python tests doc
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4

View File

@ -79,8 +79,7 @@ resource) in ``nghttp``, the following packages are needed:
* libxml2 >= 2.7.7 * libxml2 >= 2.7.7
The header compression test tools in hdtest directory require the The HPACK tools require the following package:
following package:
* jansson >= 2.5 * jansson >= 2.5
@ -418,14 +417,14 @@ the outside HTTP/2.0 proxy through HTTP proxy::
--===================---> HTTP/2.0 Proxy --===================---> HTTP/2.0 Proxy
(HTTP proxy tunnel) (e.g., nghttpx -s) (HTTP proxy tunnel) (e.g., nghttpx -s)
Header compression test tools HPACK tools
----------------------------- -----------
The ``hdtest`` directory contains header compression test tools. The The ``src`` directory contains HPACK tools. The ``deflatehd`` is
``deflatehd`` is command-line header compression tool. The command-line header compression tool. The ``inflatehd`` is
``inflatehd`` is command-line header decompression tool. Both tools command-line header decompression tool. Both tools read input from
read input from stdin and write output to stdout. The errors are stdin and write output to stdout. The errors are written to
written to stderr. They take JSON as input and output. stderr. They take JSON as input and output.
deflatehd - header compressor deflatehd - header compressor
+++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++

View File

@ -244,12 +244,12 @@ fi
AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ]) AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
# hdtest requires jansson # HPACK tools requires jansson
if test "x${have_jansson}" = "xyes"; then if test "x${have_jansson}" = "xyes"; then
enable_hdtest=yes enable_hpack_tools=yes
fi fi
AM_CONDITIONAL([ENABLE_HDTEST], [ test "x${enable_hdtest}" = "xyes" ]) AM_CONDITIONAL([ENABLE_HPACK_TOOLS], [ test "x${enable_hpack_tools}" = "xyes" ])
# failmalloc tests # failmalloc tests
AM_CONDITIONAL([ENABLE_FAILMALLOC], [ test "x${enable_failmalloc}" = "xyes" ]) AM_CONDITIONAL([ENABLE_FAILMALLOC], [ test "x${enable_failmalloc}" = "xyes" ])
@ -328,7 +328,6 @@ AC_CONFIG_FILES([
tests/testdata/Makefile tests/testdata/Makefile
src/Makefile src/Makefile
examples/Makefile examples/Makefile
hdtest/Makefile
python/Makefile python/Makefile
doc/Makefile doc/Makefile
doc/conf.py doc/conf.py
@ -358,7 +357,7 @@ AC_MSG_NOTICE([summary of build options:
Jansson: ${have_jansson} Jansson: ${have_jansson}
Src: ${enable_src} Src: ${enable_src}
Examples: ${enable_examples} Examples: ${enable_examples}
Hdtest: ${enable_hdtest} HPACK tools: ${enable_hpack_tools}
Failmalloc: ${request_failmalloc} Failmalloc: ${request_failmalloc}
Python: ${PYTHON} ${PYTHON_VERSION} Python: ${PYTHON} ${PYTHON_VERSION}
Cython: ${CYTHON} Cython: ${CYTHON}

View File

@ -1,42 +0,0 @@
# nghttp2 - HTTP/2.0 C Library
# Copyright (c) 2013 Tatsuhiro Tsujikawa
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
if ENABLE_HDTEST
AM_CFLAGS = -Wall
AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \
-I$(srcdir)/../lib @JANSSON_CFLAGS@ @DEFS@
AM_LDFLAGS = @JANSSON_LIBS@
LDADD = $(top_builddir)/lib/libnghttp2.la
bin_PROGRAMS = inflatehd deflatehd
COMMON_SRCS = comp_helper.c comp_helper.h
inflatehd_SOURCES = inflatehd.c $(COMMON_SRCS)
deflatehd_SOURCES = deflatehd.c $(COMMON_SRCS)
endif # ENABLE_HDTEST
EXTRA_DIST = README.rst

View File

@ -1 +0,0 @@
Tools for header compression

View File

@ -27,17 +27,23 @@ TESTS =
if ENABLE_SRC if ENABLE_SRC
AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \ AM_CPPFLAGS = \
-Wall \
-I$(top_srcdir)/lib/includes \
-I$(top_builddir)/lib/includes \
-I$(top_srcdir)/lib \
@LIBSPDYLAY_CFLAGS@ \ @LIBSPDYLAY_CFLAGS@ \
@XML_CPPFLAGS@ \ @XML_CPPFLAGS@ \
@LIBEVENT_OPENSSL_CFLAGS@ \ @LIBEVENT_OPENSSL_CFLAGS@ \
@OPENSSL_CFLAGS@ \ @OPENSSL_CFLAGS@ \
@JANSSON_CFLAGS@ \
@DEFS@ @DEFS@
AM_LDFLAGS = \ AM_LDFLAGS = \
@LIBSPDYLAY_LIBS@ \ @LIBSPDYLAY_LIBS@ \
@XML_LIBS@ \ @XML_LIBS@ \
@LIBEVENT_OPENSSL_LIBS@ \ @LIBEVENT_OPENSSL_LIBS@ \
@OPENSSL_LIBS@ \ @OPENSSL_LIBS@ \
@JANSSON_LIBS@ \
@SRC_LIBS@ @SRC_LIBS@
LDADD = $(top_builddir)/lib/libnghttp2.la LDADD = $(top_builddir)/lib/libnghttp2.la
@ -113,4 +119,16 @@ nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} ${AM_LDFLAGS} \
TESTS += nghttpx-unittest TESTS += nghttpx-unittest
endif # HAVE_CUNIT endif # HAVE_CUNIT
if ENABLE_HPACK_TOOLS
bin_PROGRAMS += inflatehd deflatehd
HPACK_TOOLS_COMMON_SRCS = comp_helper.c comp_helper.h
inflatehd_SOURCES = inflatehd.c $(HPACK_TOOLS_COMMON_SRCS)
deflatehd_SOURCES = deflatehd.c $(HPACK_TOOLS_COMMON_SRCS)
endif # ENABLE_HPACK_TOOLS
endif # ENABLE_SRC endif # ENABLE_SRC