Skip to content

Commit

Permalink
Move HPACK tools from hdtest to src
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuhiro-t committed Jan 10, 2014
1 parent 25a6596 commit 0f1dea4
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# 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.
SUBDIRS = lib src examples hdtest python tests doc
SUBDIRS = lib src examples python tests doc

ACLOCAL_AMFLAGS = -I m4

Expand Down
17 changes: 8 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ resource) in ``nghttp``, the following packages are needed:

* libxml2 >= 2.7.7

The header compression test tools in hdtest directory require the
following package:
The HPACK tools require the following package:

* jansson >= 2.5

Expand Down Expand Up @@ -418,14 +417,14 @@ the outside HTTP/2.0 proxy through HTTP proxy::
--===================---> HTTP/2.0 Proxy
(HTTP proxy tunnel) (e.g., nghttpx -s)

Header compression test tools
-----------------------------
HPACK tools
-----------

The ``hdtest`` directory contains header compression test tools. The
``deflatehd`` is command-line header compression tool. The
``inflatehd`` is command-line header decompression tool. Both tools
read input from stdin and write output to stdout. The errors are
written to stderr. They take JSON as input and output.
The ``src`` directory contains HPACK tools. The ``deflatehd`` is
command-line header compression tool. The ``inflatehd`` is
command-line header decompression tool. Both tools read input from
stdin and write output to stdout. The errors are written to
stderr. They take JSON as input and output.

deflatehd - header compressor
+++++++++++++++++++++++++++++
Expand Down
9 changes: 4 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ fi

AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])

# hdtest requires jansson
# HPACK tools requires jansson
if test "x${have_jansson}" = "xyes"; then
enable_hdtest=yes
enable_hpack_tools=yes
fi

AM_CONDITIONAL([ENABLE_HDTEST], [ test "x${enable_hdtest}" = "xyes" ])
AM_CONDITIONAL([ENABLE_HPACK_TOOLS], [ test "x${enable_hpack_tools}" = "xyes" ])

# failmalloc tests
AM_CONDITIONAL([ENABLE_FAILMALLOC], [ test "x${enable_failmalloc}" = "xyes" ])
Expand Down Expand Up @@ -328,7 +328,6 @@ AC_CONFIG_FILES([
tests/testdata/Makefile
src/Makefile
examples/Makefile
hdtest/Makefile
python/Makefile
doc/Makefile
doc/conf.py
Expand Down Expand Up @@ -358,7 +357,7 @@ AC_MSG_NOTICE([summary of build options:
Jansson: ${have_jansson}
Src: ${enable_src}
Examples: ${enable_examples}
Hdtest: ${enable_hdtest}
HPACK tools: ${enable_hpack_tools}
Failmalloc: ${request_failmalloc}
Python: ${PYTHON} ${PYTHON_VERSION}
Cython: ${CYTHON}
Expand Down
42 changes: 0 additions & 42 deletions hdtest/Makefile.am

This file was deleted.

1 change: 0 additions & 1 deletion hdtest/README.rst

This file was deleted.

20 changes: 19 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,23 @@ TESTS =

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@ \
@XML_CPPFLAGS@ \
@LIBEVENT_OPENSSL_CFLAGS@ \
@OPENSSL_CFLAGS@ \
@JANSSON_CFLAGS@ \
@DEFS@
AM_LDFLAGS = \
@LIBSPDYLAY_LIBS@ \
@XML_LIBS@ \
@LIBEVENT_OPENSSL_LIBS@ \
@OPENSSL_LIBS@ \
@JANSSON_LIBS@ \
@SRC_LIBS@

LDADD = $(top_builddir)/lib/libnghttp2.la
Expand Down Expand Up @@ -113,4 +119,16 @@ nghttpx_unittest_LDADD = libnghttpx.a ${LDADD} ${AM_LDFLAGS} \
TESTS += nghttpx-unittest
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0f1dea4

Please sign in to comment.