Return-Path: X-Original-To: apmail-trafficserver-commits-archive@www.apache.org Delivered-To: apmail-trafficserver-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 83C6CD5C4 for ; Thu, 16 May 2013 21:57:22 +0000 (UTC) Received: (qmail 17846 invoked by uid 500); 16 May 2013 21:57:21 -0000 Delivered-To: apmail-trafficserver-commits-archive@trafficserver.apache.org Received: (qmail 17650 invoked by uid 500); 16 May 2013 21:57:21 -0000 Mailing-List: contact commits-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list commits@trafficserver.apache.org Received: (qmail 16889 invoked by uid 99); 16 May 2013 21:57:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 21:57:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7B05C15989; Thu, 16 May 2013 21:57:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sorber@apache.org To: commits@trafficserver.apache.org Date: Thu, 16 May 2013 21:57:35 -0000 Message-Id: In-Reply-To: <4f97c370501e4bfaa59933ecd1029a61@git.apache.org> References: <4f97c370501e4bfaa59933ecd1029a61@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/47] git commit: TS-1053: fix esi plugin unit test linkage 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 Authored: Tue May 7 16:45:45 2013 -0700 Committer: James Peach 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() { -}