This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new ef3334b Cleanup: simplify check program of QUIC
ef3334b is described below
commit ef3334b73486bf7409ac73dadd2d465c2a7999c6
Author: Masaori Koshiba <[email protected]>
AuthorDate: Mon Jun 25 12:16:38 2018 +0900
Cleanup: simplify check program of QUIC
Before this change, `make distclean` didn't work. Because many files in
upper directories are specified in *_SOURCES.
---
.gitignore | 24 +-
configure.ac | 2 -
iocore/net/quic/Makefile.am | 53 +-
iocore/net/quic/Mock.h | 10 +-
iocore/net/quic/test/Makefile.am | 579 ---------------------
.../net/quic/test/{stub_QUICConfig.cc => stub.cc} | 8 +
iocore/net/quic/test/test_QUICHandshakeProtocol.cc | 2 +-
iocore/net/quic/test/test_QUICKeyGenerator.cc | 16 -
proxy/hq/Makefile.am | 34 +-
proxy/hq/test/Makefile.am | 81 ---
10 files changed, 96 insertions(+), 713 deletions(-)
diff --git a/.gitignore b/.gitignore
index 7e79977..70bd684 100644
--- a/.gitignore
+++ b/.gitignore
@@ -94,25 +94,8 @@ lib/perl/lib/Apache/TS.pm
iocore/net/test_certlookup
iocore/net/test_UDPNet
-iocore/net/quic/test/test_QUICAckFrameCreator
-iocore/net/quic/test/test_QUICHandshakeProtocol
-iocore/net/quic/test/test_QUICFlowController
-iocore/net/quic/test/test_QUICFrame
-iocore/net/quic/test/test_QUICFrameDispatcher
-iocore/net/quic/test/test_QUICLossDetector
-iocore/net/quic/test/test_QUICHandshake
-iocore/net/quic/test/test_QUICIncomingFrameBuffer
-iocore/net/quic/test/test_QUICInvariants
-iocore/net/quic/test/test_QUICKeyGenerator
-iocore/net/quic/test/test_QUICPacket
-iocore/net/quic/test/test_QUICPacketFactory
-iocore/net/quic/test/test_QUICStream
-iocore/net/quic/test/test_QUICStreamManager
-iocore/net/quic/test/test_QUICStreamState
-iocore/net/quic/test/test_QUICTransportParameters
-iocore/net/quic/test/test_QUICTypeUtil
-iocore/net/quic/test/test_QUICVersionNegotiator
-iocore/net/quic/ts_quic_client
+iocore/net/quic/test_libquic
+iocore/net/quic/test_libquic_w_ep
iocore/aio/test_AIO
iocore/eventsystem/test_Buffer
iocore/eventsystem/test_Event
@@ -127,8 +110,7 @@ proxy/http2/test_Huffmancode
proxy/http2/test_Http2DependencyTree
proxy/http2/test_HPACK
proxy/http2/hpack-tests/results
-proxy/hq/test/test_HQFrame
-proxy/hq/test/test_HQFrameDispatcher
+proxy/hq/test_libhq
proxy/logging/test_LogUtils
plugins/header_rewrite/header_rewrite_test
diff --git a/configure.ac b/configure.ac
index f122112..ef8a4dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2065,7 +2065,6 @@ AC_CONFIG_FILES([
iocore/hostdb/Makefile
iocore/net/Makefile
iocore/net/quic/Makefile
- iocore/net/quic/test/Makefile
iocore/utils/Makefile
lib/Makefile
lib/cppapi/Makefile
@@ -2095,7 +2094,6 @@ AC_CONFIG_FILES([
proxy/http/remap/Makefile
proxy/http2/Makefile
proxy/hq/Makefile
- proxy/hq/test/Makefile
proxy/logging/Makefile
proxy/shared/Makefile
rc/Makefile
diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index d9787f5..d70093f 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -16,8 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SUBDIRS = test
-
AM_CPPFLAGS += \
$(iocore_include_dirs) \
-I$(abs_top_srcdir)/lib \
@@ -79,6 +77,57 @@ libquic_a_SOURCES = \
QUICPathValidator.cc \
QUICStatelessRetry.cc
+#
+# Check Programs
+#
+
+check_PROGRAMS = \
+ test_libquic
+
+test_libquic_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(abs_top_srcdir)/tests/include
+
+test_libquic_LDFLAGS = \
+ @AM_LDFLAGS@
+
+test_libquic_LDADD = \
+ libquic.a \
+ $(top_builddir)/lib/records/librecords_p.a \
+ $(top_builddir)/lib/ts/libtsutil.la \
+ $(top_builddir)/iocore/eventsystem/libinkevent.a \
+ $(top_builddir)/mgmt/libmgmt_p.la \
+ $(top_builddir)/proxy/shared/libUglyLogStubs.a \
+ @LIBTCL@ @OPENSSL_LIBS@ \
+ @HWLOC_LIBS@
+
+test_libquic_SOURCES = \
+ ./test/event_processor_main.cc \
+ ./test/stub.cc \
+ ./test/test_QUICAckFrameCreator.cc \
+ ./test/test_QUICFlowController.cc \
+ ./test/test_QUICFrame.cc \
+ ./test/test_QUICFrameDispatcher.cc \
+ ./test/test_QUICLossDetector.cc \
+ ./test/test_QUICHandshake.cc \
+ ./test/test_QUICHandshakeProtocol.cc \
+ ./test/test_QUICIncomingFrameBuffer.cc \
+ ./test/test_QUICInvariants.cc \
+ ./test/test_QUICKeyGenerator.cc \
+ ./test/test_QUICPacket.cc \
+ ./test/test_QUICPacketFactory.cc \
+ ./test/test_QUICStream.cc \
+ ./test/test_QUICStreamManager.cc \
+ ./test/test_QUICStreamState.cc \
+ ./test/test_QUICTransportParameters.cc \
+ ./test/test_QUICTypeUtil.cc \
+ ./test/test_QUICVersionNegotiator.cc
+
+TESTS = $(check_PROGRAMS)
+
+#
+# clang-tidy
+#
include $(top_srcdir)/build/tidy.mk
tidy-local: $(DIST_SOURCES)
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index 9c578de..b2e2624 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -20,6 +20,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+#pragma once
+
#include "P_Net.h"
#include "QUICApplication.h"
@@ -592,13 +595,6 @@ public:
}
};
-void NetVConnection::cancel_OOB(){};
-Action *
-NetVConnection::send_OOB(Continuation *, char *, int)
-{
- return nullptr;
-}
-
class MockContinuation : public Continuation
{
public:
diff --git a/iocore/net/quic/test/Makefile.am b/iocore/net/quic/test/Makefile.am
deleted file mode 100644
index b80c094..0000000
--- a/iocore/net/quic/test/Makefile.am
+++ /dev/null
@@ -1,579 +0,0 @@
-# Makefile.am for the traffic/iocore/net hierarchy
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-TESTS = $(check_PROGRAMS)
-check_PROGRAMS = \
- test_QUICInvariants \
- test_QUICPacket \
- test_QUICPacketFactory \
- test_QUICFrame \
- test_QUICFrameDispatcher \
- test_QUICStreamState \
- test_QUICStream \
- test_QUICStreamManager \
- test_QUICTransportParameters \
- test_QUICKeyGenerator \
- test_QUICHandshakeProtocol \
- test_QUICLossDetector \
- test_QUICTypeUtil \
- test_QUICAckFrameCreator \
- test_QUICVersionNegotiator \
- test_QUICFlowController \
- test_QUICIncomingFrameBuffer \
- test_QUICHandshake
-
-AM_CPPFLAGS += \
- $(iocore_include_dirs) \
- -I$(abs_top_srcdir)/lib \
- -I$(abs_top_srcdir)/lib/records \
- -I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/proxy \
- -I$(abs_top_srcdir)/proxy/hdrs \
- -I$(abs_top_srcdir)/proxy/http \
- -I$(abs_top_srcdir)/proxy/logging \
- -I$(abs_top_srcdir)/proxy/shared \
- -I$(abs_top_srcdir)/tests/include \
- $(TS_INCLUDES) \
- @OPENSSL_INCLUDES@
-
-if OPENSSL_IS_BORINGSSL
-QUICKeyGenerator_impl = ../QUICKeyGenerator_boringssl.cc
-QUICTLS_impl = ../QUICTLS_boringssl.cc
-else
-QUICKeyGenerator_impl = ../QUICKeyGenerator_openssl.cc
-QUICTLS_impl = ../QUICTLS_openssl.cc
-endif
-
-catch_main = \
- main.cc \
- stub_QUICConfig.cc \
- ../../SSLNextProtocolSet.cc
-
-catch_event_processor_main = \
- event_processor_main.cc \
- stub_QUICConfig.cc \
- ../../SSLNextProtocolSet.cc
-
-test_LDADD = \
- $(top_builddir)/lib/records/librecords_p.a \
- $(top_builddir)/lib/ts/libtsutil.la \
- $(top_builddir)/iocore/eventsystem/libinkevent.a \
- $(top_builddir)/iocore/net/quic/libquic.a \
- $(top_builddir)/mgmt/libmgmt_p.la \
- $(top_builddir)/proxy/shared/libUglyLogStubs.a \
- @LIBTCL@ @OPENSSL_LIBS@ \
- @HWLOC_LIBS@
-
-#
-# test_QUICInvariants
-#
-test_QUICInvariants_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICInvariants_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICInvariants_SOURCES = \
- $(catch_main) \
- test_QUICInvariants.cc
-
-test_QUICInvariants_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICPacket
-#
-test_QUICPacket_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICPacket_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICPacket_SOURCES = \
- $(catch_main) \
- test_QUICPacket.cc \
- ../QUICPacket.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICTypes.cc
-
-test_QUICPacket_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICPacketFactory
-#
-test_QUICPacketFactory_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICPacketFactory_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICPacketFactory_SOURCES = \
- $(catch_main) \
- test_QUICPacketFactory.cc \
- ../QUICPacket.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICTypes.cc
-
-test_QUICPacketFactory_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICFrame
-#
-test_QUICFrame_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICFrame_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICFrame_SOURCES = \
- $(catch_main) \
- test_QUICFrame.cc \
- ../QUICGlobals.cc \
- ../QUICFrame.cc \
- ../QUICPacket.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICStream.cc \
- ../QUICStreamState.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICDebugNames.cc \
- ../QUICFlowController.cc
-
-test_QUICFrame_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICFrameDispatcher
-#
-test_QUICFrameDispatcher_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICFrameDispatcher_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICFrameDispatcher_SOURCES = \
- $(catch_event_processor_main) \
- test_QUICFrameDispatcher.cc \
- ../QUICGlobals.cc \
- ../QUICConfig.cc \
- ../QUICVersionNegotiator.cc \
- ../QUICFrameDispatcher.cc \
- ../QUICTransportParameters.cc \
- ../QUICStreamManager.cc \
- ../QUICApplicationMap.cc \
- ../QUICCongestionController.cc \
- ../QUICFlowController.cc \
- ../QUICLossDetector.cc \
- ../QUICFrame.cc \
- ../QUICPacket.cc \
- ../QUICStream.cc \
- ../QUICStreamState.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICApplication.cc \
- ../QUICHandshake.cc \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICEchoApp.cc \
- ../QUICDebugNames.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc
-
-test_QUICFrameDispatcher_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICStreamState
-#
-test_QUICStreamState_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICStreamState_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICStreamState_SOURCES = \
- $(catch_main) \
- test_QUICStreamState.cc \
- ../QUICStreamState.cc
-
-test_QUICStreamState_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICStream
-#
-test_QUICStream_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICStream_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICStream_SOURCES = \
- $(catch_event_processor_main) \
- test_QUICStream.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICFrameDispatcher.cc \
- ../QUICStreamManager.cc \
- ../QUICApplicationMap.cc \
- ../QUICCongestionController.cc
-
-test_QUICStream_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICStreamManager
-#
-test_QUICStreamManager_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICStreamManager_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICStreamManager_SOURCES = \
- $(catch_event_processor_main) \
- test_QUICStreamManager.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICFrameDispatcher.cc \
- ../QUICStreamManager.cc \
- ../QUICApplicationMap.cc \
- ../QUICCongestionController.cc \
- ../QUICConfig.cc
-
-test_QUICStreamManager_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICTransportParameters
-#
-test_QUICTransportParameters_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICTransportParameters_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICTransportParameters_SOURCES = \
- $(catch_main) \
- test_QUICTransportParameters.cc \
- ../QUICGlobals.cc \
- ../QUICConfig.cc \
- ../QUICApplication.cc \
- ../QUICApplicationMap.cc \
- ../QUICHandshake.cc \
- ../QUICVersionNegotiator.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICStreamState.cc \
- ../QUICStreamManager.cc \
- ../QUICFlowController.cc \
- ../QUICPacket.cc \
- ../QUICFrame.cc \
- ../QUICDebugNames.cc \
- ../QUICTransportParameters.cc \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc
-
-test_QUICTransportParameters_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICKeyGenerator
-#
-test_QUICKeyGenerator_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICKeyGenerator_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICKeyGenerator_LDADD = \
- $(test_LDADD)
-
-test_QUICKeyGenerator_SOURCES = \
- $(catch_main) \
- test_QUICKeyGenerator.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICDebugNames.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICFlowController.cc \
- ../QUICPacket.cc \
- ../QUICStreamState.cc \
- ../QUICFrame.cc \
- ../QUICStream.cc \
- ../QUICHKDF.cc \
- ../QUICIntUtil.cc \
- ../QUICTypes.cc
-
-#
-# test_QUICHandshakeProtocol
-#
-test_QUICHandshakeProtocol_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICHandshakeProtocol_LDFLAGS = \
- @AM_LDFLAGS@ \
- @OPENSSL_LDFLAGS@
-
-test_QUICHandshakeProtocol_LDADD = \
- $(test_LDADD)
-
-test_QUICHandshakeProtocol_SOURCES = \
- $(catch_main) \
- test_QUICHandshakeProtocol.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICHandshakeProtocol.h \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICDebugNames.cc \
- ../QUICStreamState.cc \
- ../QUICFrame.cc \
- ../QUICStream.cc \
- ../QUICPacket.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICFlowController.cc \
- ../QUICGlobals.cc
-
-#
-# test_QUICLossDetector
-#
-test_QUICLossDetector_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICLossDetector_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICLossDetector_LDADD = \
- $(test_LDADD)
-
-test_QUICLossDetector_SOURCES = \
- $(catch_event_processor_main) \
- test_QUICLossDetector.cc \
- ../QUICLossDetector.cc \
- ../QUICTypes.cc \
- ../QUICPacket.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICFrame.cc
-
-#
-# test_QUICTypeUtil
-#
-test_QUICTypeUtil_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICTypeUtil_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICTypeUtil_LDADD = \
- $(test_LDADD)
-
-test_QUICTypeUtil_SOURCES = \
- $(catch_main) \
- test_QUICTypeUtil.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICStreamState.cc \
- ../QUICFlowController.cc \
- ../QUICDebugNames.cc \
- ../QUICFrame.cc \
- ../QUICPacket.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICIntUtil.cc \
- ../QUICTypes.cc
-
-#
-# test_QUICAckFrameCreator
-#
-test_QUICAckFrameCreator_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICAckFrameCreator_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICAckFrameCreator_LDADD = \
- $(test_LDADD)
-
-test_QUICAckFrameCreator_SOURCES = \
- $(catch_main) \
- test_QUICAckFrameCreator.cc \
- ../QUICAckFrameCreator.cc \
- ../QUICGlobals.cc \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICFrame.cc \
- ../QUICPacket.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICStreamState.cc \
- ../QUICFlowController.cc \
- ../QUICDebugNames.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl)
-
-#
-# test_QUICTypeUtil
-#
-test_QUICVersionNegotiator_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICVersionNegotiator_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICVersionNegotiator_LDADD = \
- $(test_LDADD)
-
-test_QUICVersionNegotiator_SOURCES = \
- $(catch_main) \
- test_QUICVersionNegotiator.cc \
- ../QUICGlobals.cc \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICPacket.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICApplication.cc \
- ../QUICApplicationMap.cc \
- ../QUICHandshake.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICStreamState.cc \
- ../QUICStreamManager.cc \
- ../QUICFlowController.cc \
- ../QUICFrame.cc \
- ../QUICDebugNames.cc \
- ../QUICVersionNegotiator.cc \
- ../QUICTransportParameters.cc \
- ../QUICConfig.cc
-
-#
-# test_QUICFlowController
-#
-test_QUICFlowController_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICFlowController_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICFlowController_LDADD = \
- $(test_LDADD)
-
-test_QUICFlowController_SOURCES = \
- $(catch_main) \
- test_QUICFlowController.cc \
- ../QUICFlowController.cc \
- ../QUICStream.cc \
- ../QUICIncomingFrameBuffer.cc \
- ../QUICStreamState.cc \
- ../QUICDebugNames.cc \
- ../QUICTypes.cc \
- ../QUICIntUtil.cc \
- ../QUICPacket.cc \
- ../QUICKeyGenerator.cc \
- $(QUICKeyGenerator_impl) \
- ../QUICHKDF.cc \
- ../QUICHandshakeProtocol.cc \
- ../QUICTLS.cc \
- $(QUICTLS_impl) \
- ../QUICFrame.cc \
- ../QUICLossDetector.cc
-
-#
-# test_QUICIncomingFrameBuffer
-#
-test_QUICIncomingFrameBuffer_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICIncomingFrameBuffer_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICIncomingFrameBuffer_SOURCES = \
- $(catch_event_processor_main) \
- ../QUICStream.cc \
- ../QUICFrameDispatcher.cc \
- ../QUICStreamManager.cc \
- ../QUICApplicationMap.cc \
- ../QUICCongestionController.cc \
- ../QUICIncomingFrameBuffer.cc \
- test_QUICIncomingFrameBuffer.cc
-
-test_QUICIncomingFrameBuffer_LDADD = \
- $(test_LDADD)
-
-#
-# test_QUICHandshake
-#
-test_QUICHandshake_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_QUICHandshake_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_QUICHandshake_SOURCES = \
- $(catch_event_processor_main) \
- test_QUICHandshake.cc \
- ../QUICHandshake.cc
-
-test_QUICHandshake_LDADD = \
- $(test_LDADD)
-
-include $(top_srcdir)/build/tidy.mk
-
-tidy-local: $(DIST_SOURCES)
- $(CXX_Clang_Tidy)
diff --git a/iocore/net/quic/test/stub_QUICConfig.cc
b/iocore/net/quic/test/stub.cc
similarity index 88%
rename from iocore/net/quic/test/stub_QUICConfig.cc
rename to iocore/net/quic/test/stub.cc
index aa817ab..958661a 100644
--- a/iocore/net/quic/test/stub_QUICConfig.cc
+++ b/iocore/net/quic/test/stub.cc
@@ -41,3 +41,11 @@ SSLConfig::release(SSLConfigParams *)
{
return;
}
+
+#include "P_SSLNextProtocolSet.h"
+
+bool
+SSLNextProtocolSet::advertiseProtocols(const unsigned char **out, unsigned
*len) const
+{
+ return true;
+}
diff --git a/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
b/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
index f24c657..1e5e227 100644
--- a/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
+++ b/iocore/net/quic/test/test_QUICHandshakeProtocol.cc
@@ -40,7 +40,7 @@ static constexpr uint32_t MAX_HANDSHAKE_MSG_LEN = 2048;
#include "./server_cert.h"
-void
+static void
print_hex(const uint8_t *v, size_t len)
{
for (size_t i = 0; i < len; i++) {
diff --git a/iocore/net/quic/test/test_QUICKeyGenerator.cc
b/iocore/net/quic/test/test_QUICKeyGenerator.cc
index 7112390..ffb8c37 100644
--- a/iocore/net/quic/test/test_QUICKeyGenerator.cc
+++ b/iocore/net/quic/test/test_QUICKeyGenerator.cc
@@ -35,22 +35,6 @@
#include "Mock.h"
#include "QUICKeyGenerator.h"
-void
-print_hex(const uint8_t *v, size_t len)
-{
- for (size_t i = 0; i < len; i++) {
- std::cout << std::setw(2) << std::setfill('0') << std::hex <<
static_cast<uint32_t>(v[i]) << " ";
-
- if (i != 0 && (i + 1) % 32 == 0 && i != len - 1) {
- std::cout << std::endl;
- }
- }
-
- std::cout << std::endl;
-
- return;
-}
-
TEST_CASE("QUICKeyGenerator", "[quic]")
{
SECTION("CLIENT Cleartext")
diff --git a/proxy/hq/Makefile.am b/proxy/hq/Makefile.am
index 17b99b6..3276530 100644
--- a/proxy/hq/Makefile.am
+++ b/proxy/hq/Makefile.am
@@ -17,10 +17,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-include $(top_srcdir)/build/tidy.mk
-
-SUBDIRS = test
-
AM_CPPFLAGS += \
$(iocore_include_dirs) \
-I$(abs_top_srcdir)/proxy/api/ts \
@@ -51,5 +47,35 @@ libhq_a_SOURCES = \
HQStreamDataVIOAdaptor.cc \
QUICSimpleApp.cc
+#
+# Check Programs
+#
+check_PROGRAMS = \
+ test_libhq
+
+TESTS = $(check_PROGRAMS)
+
+test_libhq_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(abs_top_srcdir)/tests/include
+
+test_libhq_LDFLAGS = \
+ @AM_LDFLAGS@
+
+test_libhq_SOURCES = \
+ ./test/main.cc \
+ ./test/test_HQFrame.cc \
+ ./test/test_HQFrameDispatcher.cc
+
+test_libhq_LDADD = \
+ libhq.a \
+ $(top_builddir)/iocore/net/quic/libquic.a \
+ $(top_builddir)/lib/ts/libtsutil.la
+
+#
+# clang-tidy
+#
+include $(top_srcdir)/build/tidy.mk
+
tidy-local: $(libhq_a_SOURCES) \
$(CXX_Clang_Tidy)
diff --git a/proxy/hq/test/Makefile.am b/proxy/hq/test/Makefile.am
deleted file mode 100644
index 10536c9..0000000
--- a/proxy/hq/test/Makefile.am
+++ /dev/null
@@ -1,81 +0,0 @@
-# Makefile.am for the traffic/iocore/net hierarchy
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-TESTS = $(check_PROGRAMS)
-check_PROGRAMS = \
- test_HQFrame \
- test_HQFrameDispatcher
-
-
-AM_CPPFLAGS += \
- $(iocore_include_dirs) \
- -I$(abs_top_srcdir)/lib \
- -I$(abs_top_srcdir)/lib/records \
- -I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/proxy \
- -I$(abs_top_srcdir)/proxy/hdrs \
- -I$(abs_top_srcdir)/proxy/http \
- -I$(abs_top_srcdir)/proxy/hq \
- -I$(abs_top_srcdir)/proxy/logging \
- -I$(abs_top_srcdir)/proxy/shared \
- -I$(abs_top_srcdir)/tests/include \
- @OPENSSL_INCLUDES@
-
-#
-# test_HQFrame
-#
-test_HQFrame_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_HQFrame_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_HQFrame_SOURCES = \
- main.cc \
- test_HQFrame.cc \
- ../HQFrame.cc
-
-test_HQFrame_LDADD = \
- $(top_builddir)/iocore/net/quic/libquic.a \
- $(top_builddir)/lib/ts/libtsutil.la
-
-#
-# test_HQFrameDispatcher
-#
-test_HQFrameDispatcher_CPPFLAGS = \
- $(AM_CPPFLAGS)
-
-test_HQFrameDispatcher_LDFLAGS = \
- @AM_LDFLAGS@
-
-test_HQFrameDispatcher_SOURCES = \
- main.cc \
- test_HQFrameDispatcher.cc \
- ../HQFrameDispatcher.cc \
- ../HQFrame.cc
-
-test_HQFrameDispatcher_LDADD = \
- $(top_builddir)/iocore/net/quic/libquic.a \
- $(top_builddir)/lib/ts/libtsutil.la
-
-
-include $(top_srcdir)/build/tidy.mk
-
-tidy-local: $(DIST_SOURCES)
- $(CXX_Clang_Tidy)