trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sor...@apache.org
Subject [16/47] git commit: TS-1053: fix esi plugin unit test linkage
Date Thu, 16 May 2013 21:57:35 GMT
TS-1053: fix esi plugin unit test linkage


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e4e911bd
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e4e911bd
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e4e911bd

Branch: refs/heads/sphinx-docs
Commit: e4e911bd5eb6e4837d8568bdfa4889883e2fa1f6
Parents: 75ccaa4
Author: James Peach <jpeach@apache.org>
Authored: Tue May 7 16:45:45 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Tue May 7 16:45:48 2013 -0700

----------------------------------------------------------------------
 plugins/experimental/esi/Makefile.am            |   21 ++++++---
 plugins/experimental/esi/test/HandlerManager.cc |   42 ------------------
 2 files changed, 15 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e4e911bd/plugins/experimental/esi/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/Makefile.am b/plugins/experimental/esi/Makefile.am
index 82a3164..0ce5ecd 100644
--- a/plugins/experimental/esi/Makefile.am
+++ b/plugins/experimental/esi/Makefile.am
@@ -42,8 +42,22 @@ libesicore_la_SOURCES = \
 	lib/Variables.cc \
 	lib/gzip.cc
 
+# NOTE: HandlerManager::getHandler() is implemented differently in
+# HandlerManager.cc and TestHandlerManager.cc. The unit tests depend
+# on the TestHandlerManager.cc implementation, so don't accidentally
+# link the wrong one into libtest.
+
 libtest_la_SOURCES = \
-	$(libesicore_la_SOURCES) \
+	lib/DocNode.cc \
+	lib/EsiParser.cc \
+	lib/EsiGzip.cc \
+	lib/EsiProcessor.cc \
+	lib/Expression.cc \
+	lib/FailureInfo.cc \
+	lib/Stats.cc \
+	lib/Utils.cc \
+	lib/Variables.cc \
+	lib/gzip.cc \
 	test/print_funcs.cc \
 	test/HandlerMap.cc \
 	test/StubIncludeHandler.cc \
@@ -67,23 +81,18 @@ combo_handler_la_LDFLAGS = $(TS_PLUGIN_LDFLAGS)
 docnode_test_SOURCES = test/docnode_test.cc
 docnode_test_LDADD = libtest.la -lz
 
-
 parser_test_SOURCES = test/parser_test.cc
 parser_test_LDADD = libtest.la -lz
 
-
 processor_test_SOURCES = test/processor_test.cc
 processor_test_LDADD = libtest.la -lz
 
-
 utils_test_SOURCES = test/utils_test.cc
 utils_test_LDADD = libtest.la -lz
 
-
 vars_test_SOURCES = test/vars_test.cc
 vars_test_LDADD = libtest.la -lz
 
-
 TESTS = $(check_PROGRAMS)
 
 test:: $(TESTS)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e4e911bd/plugins/experimental/esi/test/HandlerManager.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/esi/test/HandlerManager.cc b/plugins/experimental/esi/test/HandlerManager.cc
deleted file mode 100644
index 548a35e..0000000
--- a/plugins/experimental/esi/test/HandlerManager.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  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.
- */
-
-#include "HandlerManager.h"
-#include "HandlerMap.h"
-
-using namespace EsiLib;
-
-void
-HandlerManager::loadObjects(const Utils::KeyValueMap &handlers) {
-}
-
-SpecialIncludeHandler *
-HandlerManager::getHandler(Variables &esi_vars, Expression &esi_expr, HttpDataFetcher
&fetcher,
-                           const std::string &id) const {
-  StubIncludeHandler *handler = new StubIncludeHandler(esi_vars, esi_expr, fetcher);
-  gHandlerMap[id] = handler;
-  return handler;
-}
-
-HandlerManager::~HandlerManager() {
-}


Mime
View raw message