From b0fcd6878369788777eff8989427a6254e278321 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 10 Sep 2012 21:39:51 +0900 Subject: [PATCH] Move spdycat, spdyd and shrpx from examples to src To distinguish the to-be-installed programs and non-installable example source code, the former programs, spdycat, spdydyd and shrpx, were moved to src directory. spdynative was removed from Makefile because it does not appeal to any users much. --- Makefile.am | 2 +- configure.ac | 1 + examples/Makefile.am | 76 +-------------- {examples => src}/EventPoll.h | 0 {examples => src}/EventPollEvent.h | 0 {examples => src}/EventPoll_epoll.cc | 0 {examples => src}/EventPoll_epoll.h | 0 {examples => src}/EventPoll_kqueue.cc | 0 {examples => src}/EventPoll_kqueue.h | 0 {examples => src}/HtmlParser.cc | 0 {examples => src}/HtmlParser.h | 0 src/Makefile.am | 95 +++++++++++++++++++ {examples => src}/SpdyServer.cc | 0 {examples => src}/SpdyServer.h | 0 {examples => src}/http-parser/AUTHORS | 0 {examples => src}/http-parser/CONTRIBUTIONS | 0 {examples => src}/http-parser/LICENSE-MIT | 0 {examples => src}/http-parser/README.md | 0 {examples => src}/http-parser/http_parser.c | 0 {examples => src}/http-parser/http_parser.gyp | 0 {examples => src}/http-parser/http_parser.h | 0 {examples => src}/http-parser/test.c | 0 {examples => src}/shrpx.cc | 0 {examples => src}/shrpx.h | 0 {examples => src}/shrpx_accesslog.cc | 0 {examples => src}/shrpx_accesslog.h | 0 {examples => src}/shrpx_client_handler.cc | 0 {examples => src}/shrpx_client_handler.h | 0 {examples => src}/shrpx_config.cc | 0 {examples => src}/shrpx_config.h | 0 {examples => src}/shrpx_downstream.cc | 0 {examples => src}/shrpx_downstream.h | 0 .../shrpx_downstream_connection.cc | 0 .../shrpx_downstream_connection.h | 0 {examples => src}/shrpx_downstream_queue.cc | 0 {examples => src}/shrpx_downstream_queue.h | 0 {examples => src}/shrpx_error.h | 0 {examples => src}/shrpx_http.cc | 0 {examples => src}/shrpx_http.h | 0 {examples => src}/shrpx_https_upstream.cc | 0 {examples => src}/shrpx_https_upstream.h | 0 {examples => src}/shrpx_io_control.cc | 0 {examples => src}/shrpx_io_control.h | 0 {examples => src}/shrpx_listen_handler.cc | 0 {examples => src}/shrpx_listen_handler.h | 0 {examples => src}/shrpx_log.cc | 0 {examples => src}/shrpx_log.h | 0 {examples => src}/shrpx_spdy_upstream.cc | 0 {examples => src}/shrpx_spdy_upstream.h | 0 {examples => src}/shrpx_ssl.cc | 0 {examples => src}/shrpx_ssl.h | 0 .../shrpx_thread_event_receiver.cc | 0 .../shrpx_thread_event_receiver.h | 0 {examples => src}/shrpx_upstream.h | 0 {examples => src}/shrpx_worker.cc | 0 {examples => src}/shrpx_worker.h | 0 {examples => src}/spdycat.cc | 0 {examples => src}/spdyd.cc | 0 {examples => src}/spdylay_config.h | 0 {examples => src}/spdylay_ssl.cc | 0 {examples => src}/spdylay_ssl.h | 0 {examples => src}/uri.cc | 0 {examples => src}/uri.h | 0 {examples => src}/util.cc | 0 {examples => src}/util.h | 0 tests/end_to_end.py | 9 +- 66 files changed, 104 insertions(+), 79 deletions(-) rename {examples => src}/EventPoll.h (100%) rename {examples => src}/EventPollEvent.h (100%) rename {examples => src}/EventPoll_epoll.cc (100%) rename {examples => src}/EventPoll_epoll.h (100%) rename {examples => src}/EventPoll_kqueue.cc (100%) rename {examples => src}/EventPoll_kqueue.h (100%) rename {examples => src}/HtmlParser.cc (100%) rename {examples => src}/HtmlParser.h (100%) create mode 100644 src/Makefile.am rename {examples => src}/SpdyServer.cc (100%) rename {examples => src}/SpdyServer.h (100%) rename {examples => src}/http-parser/AUTHORS (100%) rename {examples => src}/http-parser/CONTRIBUTIONS (100%) rename {examples => src}/http-parser/LICENSE-MIT (100%) rename {examples => src}/http-parser/README.md (100%) rename {examples => src}/http-parser/http_parser.c (100%) rename {examples => src}/http-parser/http_parser.gyp (100%) rename {examples => src}/http-parser/http_parser.h (100%) rename {examples => src}/http-parser/test.c (100%) rename {examples => src}/shrpx.cc (100%) rename {examples => src}/shrpx.h (100%) rename {examples => src}/shrpx_accesslog.cc (100%) rename {examples => src}/shrpx_accesslog.h (100%) rename {examples => src}/shrpx_client_handler.cc (100%) rename {examples => src}/shrpx_client_handler.h (100%) rename {examples => src}/shrpx_config.cc (100%) rename {examples => src}/shrpx_config.h (100%) rename {examples => src}/shrpx_downstream.cc (100%) rename {examples => src}/shrpx_downstream.h (100%) rename {examples => src}/shrpx_downstream_connection.cc (100%) rename {examples => src}/shrpx_downstream_connection.h (100%) rename {examples => src}/shrpx_downstream_queue.cc (100%) rename {examples => src}/shrpx_downstream_queue.h (100%) rename {examples => src}/shrpx_error.h (100%) rename {examples => src}/shrpx_http.cc (100%) rename {examples => src}/shrpx_http.h (100%) rename {examples => src}/shrpx_https_upstream.cc (100%) rename {examples => src}/shrpx_https_upstream.h (100%) rename {examples => src}/shrpx_io_control.cc (100%) rename {examples => src}/shrpx_io_control.h (100%) rename {examples => src}/shrpx_listen_handler.cc (100%) rename {examples => src}/shrpx_listen_handler.h (100%) rename {examples => src}/shrpx_log.cc (100%) rename {examples => src}/shrpx_log.h (100%) rename {examples => src}/shrpx_spdy_upstream.cc (100%) rename {examples => src}/shrpx_spdy_upstream.h (100%) rename {examples => src}/shrpx_ssl.cc (100%) rename {examples => src}/shrpx_ssl.h (100%) rename {examples => src}/shrpx_thread_event_receiver.cc (100%) rename {examples => src}/shrpx_thread_event_receiver.h (100%) rename {examples => src}/shrpx_upstream.h (100%) rename {examples => src}/shrpx_worker.cc (100%) rename {examples => src}/shrpx_worker.h (100%) rename {examples => src}/spdycat.cc (100%) rename {examples => src}/spdyd.cc (100%) rename {examples => src}/spdylay_config.h (100%) rename {examples => src}/spdylay_ssl.cc (100%) rename {examples => src}/spdylay_ssl.h (100%) rename {examples => src}/uri.cc (100%) rename {examples => src}/uri.h (100%) rename {examples => src}/util.cc (100%) rename {examples => src}/util.h (100%) diff --git a/Makefile.am b/Makefile.am index 88518bb8..b8cf793b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 examples tests doc python +SUBDIRS = lib src tests examples doc python ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index b8215076..be917e11 100644 --- a/configure.ac +++ b/configure.ac @@ -228,6 +228,7 @@ AC_CONFIG_FILES([ lib/includes/spdylay/spdylayver.h tests/Makefile tests/testdata/Makefile + src/Makefile examples/Makefile doc/Makefile doc/conf.py diff --git a/examples/Makefile.am b/examples/Makefile.am index c2019c32..5abecb10 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -25,83 +25,11 @@ if ENABLE_EXAMPLES AM_CFLAGS = -Wall AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \ - @OPENSSL_CFLAGS@ @XML_CPPFLAGS@ @LIBEVENT_OPENSSL_CFLAGS@ @DEFS@ -AM_LDFLAGS = @OPENSSL_LIBS@ @XML_LIBS@ @LIBEVENT_OPENSSL_LIBS@ -pthread + @OPENSSL_CFLAGS@ @DEFS@ +AM_LDFLAGS = @OPENSSL_LIBS@ LDADD = $(top_builddir)/lib/libspdylay.la -bin_PROGRAMS = spdycat spdyd - -if HAVE_LIBEVENT_OPENSSL -bin_PROGRAMS += shrpx -endif # HAVE_LIBEVENT_OPENSSL - -HELPER_OBJECTS = uri.cc util.cc spdylay_ssl.cc -HELPER_HFILES = uri.h util.h spdylay_ssl.h spdylay_config.h - -EVENT_OBJECTS = -EVENT_HFILES = EventPoll.h EventPollEvent.h - -if HAVE_EPOLL -EVENT_OBJECTS += EventPoll_epoll.cc -EVENT_HFILES += EventPoll_epoll.h -endif # HAVE_EPOLL - -if HAVE_KQUEUE -EVENT_OBJECTS += EventPoll_kqueue.cc -EVENT_HFILES += EventPoll_kqueue.h -endif # HAVE_KQUEUE - -HTML_PARSER_OBJECTS = -HTML_PARSER_HFILES = HtmlParser.h - -if HAVE_LIBXML2 -HTML_PARSER_OBJECTS += HtmlParser.cc -endif # HAVE_LIBXML2 - -SPDY_SERVER_OBJECTS = SpdyServer.cc -SPDY_SERVER_HFILES = SpdyServer.h - -spdycat_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} spdycat.cc \ - ${HTML_PARSER_OBJECTS} ${HTML_PARSER_HFILES} - -spdyd_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ - ${EVENT_OBJECTS} ${EVENT_HFILES} \ - ${SPDY_SERVER_OBJECTS} ${SPDY_SERVER_HFILES} \ - spdyd.cc - -if HAVE_LIBEVENT_OPENSSL -shrpx_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ - shrpx_config.cc shrpx_config.h \ - shrpx.cc shrpx.h \ - shrpx_error.h \ - shrpx_listen_handler.cc shrpx_listen_handler.h \ - shrpx_client_handler.cc shrpx_client_handler.h \ - shrpx_upstream.h \ - shrpx_spdy_upstream.cc shrpx_spdy_upstream.h \ - shrpx_https_upstream.cc shrpx_https_upstream.h \ - shrpx_downstream_queue.cc shrpx_downstream_queue.h \ - shrpx_downstream.cc shrpx_downstream.h \ - shrpx_downstream_connection.cc shrpx_downstream_connection.h \ - shrpx_log.cc shrpx_log.h \ - shrpx_http.cc shrpx_http.h \ - shrpx_io_control.cc shrpx_io_control.h \ - shrpx_ssl.cc shrpx_ssl.h \ - shrpx_thread_event_receiver.cc shrpx_thread_event_receiver.h \ - shrpx_worker.cc shrpx_worker.h \ - shrpx_accesslog.cc shrpx_accesslog.h\ - http-parser/http_parser.c http-parser/http_parser.h -endif # HAVE_LIBEVENT_OPENSSL - noinst_PROGRAMS = spdycli spdycli_SOURCES = spdycli.c -if HAVE_STDCXX_11 -noinst_PROGRAMS += spdynative -spdynative_CXXFLAGS = -std=c++0x -spdynative_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ - ${EVENT_OBJECTS} ${EVENT_HFILES} \ - ${SPDY_SERVER_OBJECTS} ${SPDY_SERVER_HFILES} \ - spdy.h spdynative.cc -endif # HAVE_STDCXX_11 - endif # ENABLE_EXAMPLES diff --git a/examples/EventPoll.h b/src/EventPoll.h similarity index 100% rename from examples/EventPoll.h rename to src/EventPoll.h diff --git a/examples/EventPollEvent.h b/src/EventPollEvent.h similarity index 100% rename from examples/EventPollEvent.h rename to src/EventPollEvent.h diff --git a/examples/EventPoll_epoll.cc b/src/EventPoll_epoll.cc similarity index 100% rename from examples/EventPoll_epoll.cc rename to src/EventPoll_epoll.cc diff --git a/examples/EventPoll_epoll.h b/src/EventPoll_epoll.h similarity index 100% rename from examples/EventPoll_epoll.h rename to src/EventPoll_epoll.h diff --git a/examples/EventPoll_kqueue.cc b/src/EventPoll_kqueue.cc similarity index 100% rename from examples/EventPoll_kqueue.cc rename to src/EventPoll_kqueue.cc diff --git a/examples/EventPoll_kqueue.h b/src/EventPoll_kqueue.h similarity index 100% rename from examples/EventPoll_kqueue.h rename to src/EventPoll_kqueue.h diff --git a/examples/HtmlParser.cc b/src/HtmlParser.cc similarity index 100% rename from examples/HtmlParser.cc rename to src/HtmlParser.cc diff --git a/examples/HtmlParser.h b/src/HtmlParser.h similarity index 100% rename from examples/HtmlParser.h rename to src/HtmlParser.h diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..6cf23dce --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,95 @@ +# Spdylay - SPDY Library + +# Copyright (c) 2012 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_EXAMPLES + +AM_CFLAGS = -Wall +AM_CPPFLAGS = -Wall -I$(srcdir)/../lib/includes -I$(builddir)/../lib/includes \ + @OPENSSL_CFLAGS@ @XML_CPPFLAGS@ @LIBEVENT_OPENSSL_CFLAGS@ @DEFS@ +AM_LDFLAGS = @OPENSSL_LIBS@ @XML_LIBS@ @LIBEVENT_OPENSSL_LIBS@ -pthread +LDADD = $(top_builddir)/lib/libspdylay.la + +bin_PROGRAMS = spdycat spdyd + +if HAVE_LIBEVENT_OPENSSL +bin_PROGRAMS += shrpx +endif # HAVE_LIBEVENT_OPENSSL + +HELPER_OBJECTS = uri.cc util.cc spdylay_ssl.cc +HELPER_HFILES = uri.h util.h spdylay_ssl.h spdylay_config.h + +EVENT_OBJECTS = +EVENT_HFILES = EventPoll.h EventPollEvent.h + +if HAVE_EPOLL +EVENT_OBJECTS += EventPoll_epoll.cc +EVENT_HFILES += EventPoll_epoll.h +endif # HAVE_EPOLL + +if HAVE_KQUEUE +EVENT_OBJECTS += EventPoll_kqueue.cc +EVENT_HFILES += EventPoll_kqueue.h +endif # HAVE_KQUEUE + +HTML_PARSER_OBJECTS = +HTML_PARSER_HFILES = HtmlParser.h + +if HAVE_LIBXML2 +HTML_PARSER_OBJECTS += HtmlParser.cc +endif # HAVE_LIBXML2 + +SPDY_SERVER_OBJECTS = SpdyServer.cc +SPDY_SERVER_HFILES = SpdyServer.h + +spdycat_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} spdycat.cc \ + ${HTML_PARSER_OBJECTS} ${HTML_PARSER_HFILES} + +spdyd_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ + ${EVENT_OBJECTS} ${EVENT_HFILES} \ + ${SPDY_SERVER_OBJECTS} ${SPDY_SERVER_HFILES} \ + spdyd.cc + +if HAVE_LIBEVENT_OPENSSL +shrpx_SOURCES = ${HELPER_OBJECTS} ${HELPER_HFILES} \ + shrpx_config.cc shrpx_config.h \ + shrpx.cc shrpx.h \ + shrpx_error.h \ + shrpx_listen_handler.cc shrpx_listen_handler.h \ + shrpx_client_handler.cc shrpx_client_handler.h \ + shrpx_upstream.h \ + shrpx_spdy_upstream.cc shrpx_spdy_upstream.h \ + shrpx_https_upstream.cc shrpx_https_upstream.h \ + shrpx_downstream_queue.cc shrpx_downstream_queue.h \ + shrpx_downstream.cc shrpx_downstream.h \ + shrpx_downstream_connection.cc shrpx_downstream_connection.h \ + shrpx_log.cc shrpx_log.h \ + shrpx_http.cc shrpx_http.h \ + shrpx_io_control.cc shrpx_io_control.h \ + shrpx_ssl.cc shrpx_ssl.h \ + shrpx_thread_event_receiver.cc shrpx_thread_event_receiver.h \ + shrpx_worker.cc shrpx_worker.h \ + shrpx_accesslog.cc shrpx_accesslog.h\ + http-parser/http_parser.c http-parser/http_parser.h +endif # HAVE_LIBEVENT_OPENSSL + +endif # ENABLE_EXAMPLES diff --git a/examples/SpdyServer.cc b/src/SpdyServer.cc similarity index 100% rename from examples/SpdyServer.cc rename to src/SpdyServer.cc diff --git a/examples/SpdyServer.h b/src/SpdyServer.h similarity index 100% rename from examples/SpdyServer.h rename to src/SpdyServer.h diff --git a/examples/http-parser/AUTHORS b/src/http-parser/AUTHORS similarity index 100% rename from examples/http-parser/AUTHORS rename to src/http-parser/AUTHORS diff --git a/examples/http-parser/CONTRIBUTIONS b/src/http-parser/CONTRIBUTIONS similarity index 100% rename from examples/http-parser/CONTRIBUTIONS rename to src/http-parser/CONTRIBUTIONS diff --git a/examples/http-parser/LICENSE-MIT b/src/http-parser/LICENSE-MIT similarity index 100% rename from examples/http-parser/LICENSE-MIT rename to src/http-parser/LICENSE-MIT diff --git a/examples/http-parser/README.md b/src/http-parser/README.md similarity index 100% rename from examples/http-parser/README.md rename to src/http-parser/README.md diff --git a/examples/http-parser/http_parser.c b/src/http-parser/http_parser.c similarity index 100% rename from examples/http-parser/http_parser.c rename to src/http-parser/http_parser.c diff --git a/examples/http-parser/http_parser.gyp b/src/http-parser/http_parser.gyp similarity index 100% rename from examples/http-parser/http_parser.gyp rename to src/http-parser/http_parser.gyp diff --git a/examples/http-parser/http_parser.h b/src/http-parser/http_parser.h similarity index 100% rename from examples/http-parser/http_parser.h rename to src/http-parser/http_parser.h diff --git a/examples/http-parser/test.c b/src/http-parser/test.c similarity index 100% rename from examples/http-parser/test.c rename to src/http-parser/test.c diff --git a/examples/shrpx.cc b/src/shrpx.cc similarity index 100% rename from examples/shrpx.cc rename to src/shrpx.cc diff --git a/examples/shrpx.h b/src/shrpx.h similarity index 100% rename from examples/shrpx.h rename to src/shrpx.h diff --git a/examples/shrpx_accesslog.cc b/src/shrpx_accesslog.cc similarity index 100% rename from examples/shrpx_accesslog.cc rename to src/shrpx_accesslog.cc diff --git a/examples/shrpx_accesslog.h b/src/shrpx_accesslog.h similarity index 100% rename from examples/shrpx_accesslog.h rename to src/shrpx_accesslog.h diff --git a/examples/shrpx_client_handler.cc b/src/shrpx_client_handler.cc similarity index 100% rename from examples/shrpx_client_handler.cc rename to src/shrpx_client_handler.cc diff --git a/examples/shrpx_client_handler.h b/src/shrpx_client_handler.h similarity index 100% rename from examples/shrpx_client_handler.h rename to src/shrpx_client_handler.h diff --git a/examples/shrpx_config.cc b/src/shrpx_config.cc similarity index 100% rename from examples/shrpx_config.cc rename to src/shrpx_config.cc diff --git a/examples/shrpx_config.h b/src/shrpx_config.h similarity index 100% rename from examples/shrpx_config.h rename to src/shrpx_config.h diff --git a/examples/shrpx_downstream.cc b/src/shrpx_downstream.cc similarity index 100% rename from examples/shrpx_downstream.cc rename to src/shrpx_downstream.cc diff --git a/examples/shrpx_downstream.h b/src/shrpx_downstream.h similarity index 100% rename from examples/shrpx_downstream.h rename to src/shrpx_downstream.h diff --git a/examples/shrpx_downstream_connection.cc b/src/shrpx_downstream_connection.cc similarity index 100% rename from examples/shrpx_downstream_connection.cc rename to src/shrpx_downstream_connection.cc diff --git a/examples/shrpx_downstream_connection.h b/src/shrpx_downstream_connection.h similarity index 100% rename from examples/shrpx_downstream_connection.h rename to src/shrpx_downstream_connection.h diff --git a/examples/shrpx_downstream_queue.cc b/src/shrpx_downstream_queue.cc similarity index 100% rename from examples/shrpx_downstream_queue.cc rename to src/shrpx_downstream_queue.cc diff --git a/examples/shrpx_downstream_queue.h b/src/shrpx_downstream_queue.h similarity index 100% rename from examples/shrpx_downstream_queue.h rename to src/shrpx_downstream_queue.h diff --git a/examples/shrpx_error.h b/src/shrpx_error.h similarity index 100% rename from examples/shrpx_error.h rename to src/shrpx_error.h diff --git a/examples/shrpx_http.cc b/src/shrpx_http.cc similarity index 100% rename from examples/shrpx_http.cc rename to src/shrpx_http.cc diff --git a/examples/shrpx_http.h b/src/shrpx_http.h similarity index 100% rename from examples/shrpx_http.h rename to src/shrpx_http.h diff --git a/examples/shrpx_https_upstream.cc b/src/shrpx_https_upstream.cc similarity index 100% rename from examples/shrpx_https_upstream.cc rename to src/shrpx_https_upstream.cc diff --git a/examples/shrpx_https_upstream.h b/src/shrpx_https_upstream.h similarity index 100% rename from examples/shrpx_https_upstream.h rename to src/shrpx_https_upstream.h diff --git a/examples/shrpx_io_control.cc b/src/shrpx_io_control.cc similarity index 100% rename from examples/shrpx_io_control.cc rename to src/shrpx_io_control.cc diff --git a/examples/shrpx_io_control.h b/src/shrpx_io_control.h similarity index 100% rename from examples/shrpx_io_control.h rename to src/shrpx_io_control.h diff --git a/examples/shrpx_listen_handler.cc b/src/shrpx_listen_handler.cc similarity index 100% rename from examples/shrpx_listen_handler.cc rename to src/shrpx_listen_handler.cc diff --git a/examples/shrpx_listen_handler.h b/src/shrpx_listen_handler.h similarity index 100% rename from examples/shrpx_listen_handler.h rename to src/shrpx_listen_handler.h diff --git a/examples/shrpx_log.cc b/src/shrpx_log.cc similarity index 100% rename from examples/shrpx_log.cc rename to src/shrpx_log.cc diff --git a/examples/shrpx_log.h b/src/shrpx_log.h similarity index 100% rename from examples/shrpx_log.h rename to src/shrpx_log.h diff --git a/examples/shrpx_spdy_upstream.cc b/src/shrpx_spdy_upstream.cc similarity index 100% rename from examples/shrpx_spdy_upstream.cc rename to src/shrpx_spdy_upstream.cc diff --git a/examples/shrpx_spdy_upstream.h b/src/shrpx_spdy_upstream.h similarity index 100% rename from examples/shrpx_spdy_upstream.h rename to src/shrpx_spdy_upstream.h diff --git a/examples/shrpx_ssl.cc b/src/shrpx_ssl.cc similarity index 100% rename from examples/shrpx_ssl.cc rename to src/shrpx_ssl.cc diff --git a/examples/shrpx_ssl.h b/src/shrpx_ssl.h similarity index 100% rename from examples/shrpx_ssl.h rename to src/shrpx_ssl.h diff --git a/examples/shrpx_thread_event_receiver.cc b/src/shrpx_thread_event_receiver.cc similarity index 100% rename from examples/shrpx_thread_event_receiver.cc rename to src/shrpx_thread_event_receiver.cc diff --git a/examples/shrpx_thread_event_receiver.h b/src/shrpx_thread_event_receiver.h similarity index 100% rename from examples/shrpx_thread_event_receiver.h rename to src/shrpx_thread_event_receiver.h diff --git a/examples/shrpx_upstream.h b/src/shrpx_upstream.h similarity index 100% rename from examples/shrpx_upstream.h rename to src/shrpx_upstream.h diff --git a/examples/shrpx_worker.cc b/src/shrpx_worker.cc similarity index 100% rename from examples/shrpx_worker.cc rename to src/shrpx_worker.cc diff --git a/examples/shrpx_worker.h b/src/shrpx_worker.h similarity index 100% rename from examples/shrpx_worker.h rename to src/shrpx_worker.h diff --git a/examples/spdycat.cc b/src/spdycat.cc similarity index 100% rename from examples/spdycat.cc rename to src/spdycat.cc diff --git a/examples/spdyd.cc b/src/spdyd.cc similarity index 100% rename from examples/spdyd.cc rename to src/spdyd.cc diff --git a/examples/spdylay_config.h b/src/spdylay_config.h similarity index 100% rename from examples/spdylay_config.h rename to src/spdylay_config.h diff --git a/examples/spdylay_ssl.cc b/src/spdylay_ssl.cc similarity index 100% rename from examples/spdylay_ssl.cc rename to src/spdylay_ssl.cc diff --git a/examples/spdylay_ssl.h b/src/spdylay_ssl.h similarity index 100% rename from examples/spdylay_ssl.h rename to src/spdylay_ssl.h diff --git a/examples/uri.cc b/src/uri.cc similarity index 100% rename from examples/uri.cc rename to src/uri.cc diff --git a/examples/uri.h b/src/uri.h similarity index 100% rename from examples/uri.h rename to src/uri.h diff --git a/examples/util.cc b/src/util.cc similarity index 100% rename from examples/util.cc rename to src/util.cc diff --git a/examples/util.h b/src/util.h similarity index 100% rename from examples/util.h rename to src/util.h diff --git a/tests/end_to_end.py b/tests/end_to_end.py index 81a64b2a..cfb3cdd7 100755 --- a/tests/end_to_end.py +++ b/tests/end_to_end.py @@ -1,7 +1,8 @@ #!/usr/bin/env python -"""End to end tests for the example programs. +"""End to end tests for the utility programs. -This test assumes the examples have already been built. +This test assumes the utilities inside src directory have already been +built. At the moment top_buiddir is not in the environment, but top_builddir would be more reliable than '..', so it's worth trying to pull it from the environment. @@ -23,7 +24,7 @@ def _run_server(port, args): srcdir = os.environ.get('srcdir', '.') testdata = '%s/testdata' % srcdir top_builddir = os.environ.get('top_builddir', '..') - base_args = ['%s/examples/spdyd' % top_builddir, '-d', testdata] + base_args = ['%s/src/spdyd' % top_builddir, '-d', testdata] if args: base_args.extend(args) base_args.extend([str(port), '%s/privkey.pem' % testdata, @@ -57,7 +58,7 @@ class EndToEndSpdyTests(unittest.TestCase): def setUp(self): build_dir = os.environ.get('top_builddir', '..') - self.client = '%s/examples/spdycat' % build_dir + self.client = '%s/src/spdycat' % build_dir self.stdout = 'No output' def call(self, path, args):