You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/09/04 15:28:30 UTC

[trafficserver] branch 9.0.x updated: Build test C/C++ files with Automake. (#6945) (#7165)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new bd1f902  Build test C/C++ files with Automake. (#6945) (#7165)
bd1f902 is described below

commit bd1f9024c386d3610f88069362ae66f6cec07d15
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Sep 4 10:28:23 2020 -0500

    Build test C/C++ files with Automake. (#6945) (#7165)
    
    Many AuTests have test plugins or test executables that are used as a
    part of the test. Before this change these were built by ad hoc calls to
    g++ or gcc via shell executions from within the test or one of a couple
    AuTest extensions. This patch removes the building of these files from
    AuTest and instead uses the Automake build system to build these. This
    will build these utilities in a way that is consistent with the rest of
    the system, using the same warning and error flags, the same
    clang tool configurations, etc.
    
    (cherry picked from commit 61f8ee3bfdea2690677d6ef3697b5aa272ffd297)
---
 .gitignore                                         |  2 +
 Makefile.am                                        |  2 +-
 configure.ac                                       |  1 +
 .../cppapi/cppapi.test.py => Makefile.am}          | 32 +++++---
 tests/gold_tests/autest-site/build.test.ext        | 53 --------------
 tests/gold_tests/autest-site/setup.cli.ext         |  1 +
 .../autest-site/trafficserver_plugins.test.ext     | 56 ++++++--------
 .../body_factory/http204_response_plugin.test.py   |  2 +-
 .../Makefile.inc}                                  | 16 +---
 .../chunked_encoding/chunked_encoding.test.py      |  7 +-
 .../command_argument/verify_global_plugin.test.py  | 67 ++++++-----------
 .../command_argument/verify_remap_plugin.test.py   | 18 ++---
 tests/gold_tests/cont_schedule/schedule.test.py    |  2 +-
 .../cont_schedule/schedule_on_pool.test.py         |  2 +-
 .../cont_schedule/schedule_on_thread.test.py       |  2 +-
 .../cont_schedule/thread_affinity.test.py          |  2 +-
 tests/gold_tests/continuations/double.test.py      |  4 +-
 tests/gold_tests/continuations/double_h2.test.py   |  4 +-
 tests/gold_tests/continuations/openclose.test.py   |  4 +-
 .../gold_tests/continuations/openclose_h2.test.py  |  4 +-
 .../plugins/Makefile.inc}                          | 15 +---
 tests/gold_tests/logging/log_retention.test.py     |  2 +-
 .../null_transform/null_transform.test.py          |  2 +-
 .../pluginTest/cert_update/cert_update.test.py     |  5 +-
 .../client_context_dump.test.py                    |  5 +-
 tests/gold_tests/pluginTest/cppapi/cppapi.test.py  |  5 +-
 .../pluginTest/test_hooks/hook_add.test.py         |  5 +-
 .../pluginTest/test_hooks/test_hooks.test.py       |  5 +-
 tests/gold_tests/pluginTest/tsapi/tsapi.test.py    |  5 +-
 tests/gold_tests/shutdown/emergency.test.py        |  2 +-
 tests/gold_tests/shutdown/fatal.test.py            |  2 +-
 tests/gold_tests/slow_post/slow_post.test.py       |  2 +-
 .../cppapi/cppapi.test.py => tls/Makefile.inc}     | 16 +---
 tests/gold_tests/tls/ssl-post.c                    | 19 +++++
 tests/gold_tests/tls/tls.test.py                   |  6 +-
 .../gold_tests/tls/tls_hooks_client_verify.test.py |  8 +-
 tests/gold_tests/tls/tls_hooks_verify.test.py      |  8 +-
 tests/gold_tests/tls/tls_keepalive.test.py         |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks.test.py       |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks10.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks11.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks12.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks13.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks14.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks15.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks16.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks17.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks18.test.py     |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks2.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks3.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks4.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks6.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks7.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks8.test.py      |  2 +-
 tests/gold_tests/tls_hooks/tls_hooks9.test.py      |  2 +-
 tests/tools/plugins/Makefile.inc                   | 85 ++++++++++++++++++++++
 ...definition.c => missing_mangled_definition_c.c} |  0
 ...nition.cc => missing_mangled_definition_cpp.cc} |  0
 tests/tools/plugins/ssl_client_verify_test.cc      | 12 ++-
 tests/tools/plugins/test_cppapi.cc                 | 10 +++
 60 files changed, 277 insertions(+), 259 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0b83c6c..493a99c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -194,6 +194,8 @@ RELEASE
 # autest
 tests/env-test/
 tests/Pipfile.lock
+tests/gold_tests/chunked_encoding/smuggle-client
+tests/gold_tests/tls/ssl-post
 
 iocore/cache/test_*
 iocore/cache/test/var/trafficserver/cache.db
diff --git a/Makefile.am b/Makefile.am
index 0d06504..8eda411 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,7 @@ export CCACHE_BASEDIR
 # and mgmt, hence we have to build proxy/hdrs first.
 
 # depends on the generates ts/ts.h include file.
-SUBDIRS = src/tscpp/util lib src/tscore iocore proxy mgmt src plugins tools example rc configs include
+SUBDIRS = src/tscpp/util lib src/tscore iocore proxy mgmt src plugins tools example rc configs include tests
 
 if BUILD_DOCS
 SUBDIRS += doc include
diff --git a/configure.ac b/configure.ac
index 979003b..806451f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2244,6 +2244,7 @@ AC_CONFIG_FILES([
   tools/trafficserver.pc
   tools/tsxs
   tests/unit_tests/Makefile
+  tests/Makefile
 ])
 
 # -----------------------------------------------------------------------------
diff --git a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py b/tests/Makefile.am
similarity index 53%
copy from tests/gold_tests/pluginTest/cppapi/cppapi.test.py
copy to tests/Makefile.am
index 809eb2a..6b0687b 100644
--- a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
+++ b/tests/Makefile.am
@@ -14,16 +14,28 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-Test.Summary = '''
-Execute plugin with cppapi tests.
-'''
+include $(top_srcdir)/build/plugins.mk
+include $(top_srcdir)/build/tidy.mk
 
-ts = Test.MakeATSProcess("ts")
+noinst_LTLIBRARIES =
+noinst_PROGRAMS =
 
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_cppapi.cc', ts, extra_build_args='-l tscppapi')
+SUBDIRS =
 
-tr = Test.AddTestRun()
-tr.Processes.Default.StartBefore(Test.Processes.ts)
-tr.Processes.Default.Command = "echo run test_cppapi plugin"
-tr.Processes.Default.ReturnCode = 0
-tr.Processes.StillRunningAfter = ts
+AM_LDFLAGS += $(TS_PLUGIN_LD_FLAGS)
+
+# Automake is pretty draconian about not creating shared object (.so) files for
+# non-installed files. However we do not want to install our test plugins so
+# we prefix them with noinst_.  The following -rpath argument coerces the
+# generation of so objects for these test files.
+AM_LDFLAGS += -rpath $(abs_builddir)
+
+include gold_tests/chunked_encoding/Makefile.inc
+include gold_tests/tls/Makefile.inc
+include tools/plugins/Makefile.inc
+
+TESTS = $(check_PROGRAMS)
+
+clang-tidy-local: $(DIST_SOURCES)
+	$(CXX_Clang_Tidy)
+	$(CC_Clang_Tidy)
diff --git a/tests/gold_tests/autest-site/build.test.ext b/tests/gold_tests/autest-site/build.test.ext
deleted file mode 100644
index ef8aa42..0000000
--- a/tests/gold_tests/autest-site/build.test.ext
+++ /dev/null
@@ -1,53 +0,0 @@
-'''
-Build random code for running as part of a test
-'''
-#  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.
-
-import re
-import autest.common.is_a as is_a
-
-
-def Build(Test, target, sources, CPPFLAGS='', LDFLAGS='', LIBS='', CC=None):
-    if is_a.OrderedSequence(sources):
-        sources = " ".join(sources)
-    tr = Test.AddTestRun("Build", "Build test files: {0}".format(sources))
-    vars = Test.ComposeVariables()
-    if CC is None:
-        cc = vars.CXX
-    else:
-        cc = CC
-
-    tr.Processes.Default.Command = '{cc} -o {target} {cppflags} {sources} {ldflags} {libs}'.format(
-        cppflags="{0} {1}".format(vars.CPPFLAGS, CPPFLAGS),
-        ldflags="{0} {1}".format(vars.LDFLAGS, LDFLAGS),
-        libs="{0} {1}".format(vars.LIBS, LIBS),
-        target=target,
-        sources=sources,
-        cc=cc
-    )
-    tr.Processes.Default.ForceUseShell = True
-    tr.ReturnCode = 0
-    tr.Streams.All = Testers.ExcludesExpression(
-        r'(\A|\s)error?\s?(([?!: ])|(\.\s))\D',
-        "Build should not contain errors",
-        reflags=re.IGNORECASE
-    )
-
-    return tr
-
-
-ExtendTest(Build, name="Build")
diff --git a/tests/gold_tests/autest-site/setup.cli.ext b/tests/gold_tests/autest-site/setup.cli.ext
index d0f1e64..6045f31 100644
--- a/tests/gold_tests/autest-site/setup.cli.ext
+++ b/tests/gold_tests/autest-site/setup.cli.ext
@@ -80,6 +80,7 @@ if ENV['ATS_BIN'] is not None:
     Variables.update(out)
 Variables.AtsExampleDir = os.path.join(AutestSitePath, '../../../example')
 Variables.AtsTestToolsDir = os.path.join(AutestSitePath, '../../tools')
+Variables.AtsTestPluginsDir = os.path.join(AutestSitePath, '../../tools/plugins/.libs')
 
 # modify delay times as we always have to kill Trafficserver
 # no need to wait
diff --git a/tests/gold_tests/autest-site/trafficserver_plugins.test.ext b/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
index e6e3087..ed3baf6 100644
--- a/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
@@ -19,47 +19,33 @@ Builds, installs, and enables an ATS plugin in the sandbox environment
 
 import os
 
-def prepare_plugin(self, path, tsproc, plugin_args = "", extra_build_args=''):
-    """Builds, installs, and enables an ATS plugin in the sandbox environment
 
-    The source file at the given path is copied to the sandbox directory of the
-    given traffic server process and compiled into a binary with the file
-    extensioned replaced with '.so'. An entry for this plugin is added to
-    the 'plugin.config' file."""
+def prepare_plugin(self, so_path, tsproc, plugin_args=""):
+    """
+    Installs and enables an ATS plugin in the sandbox environment.
 
-    # Copy the source to the sandbox directory.
-    plugin_dir = tsproc.Env['PROXY_CONFIG_PLUGIN_PLUGIN_DIR']
-    tsproc.Setup.Copy(path, plugin_dir)
+    Args:
+        so_path (str): The path to a built .so file.
+
+        tsproc (Process): The Traffic Server process whose plugin.config should
+        be configured to use the provided plugin.
 
-    tsxs = os.path.join(self.Variables.BINDIR,'tsxs')
-    # get the top level object ( ie Test) to add a condition
-    # need to change this API in AuTest to be a better name as it now has value
-    # to be called by user API - dragon512
-    self._RootRunable.SkipUnless(
-        Condition.HasProgram(tsxs, "tsxs needs be installed with trafficserver package for this test to run")
-        )
+        plugin_args (str): The arguments to provide the plugin in the
+        plugin.config.
+    """
 
-    link_gxx="export CC=c++ &&"
-    # Compile the plugin.
-    in_basename = os.path.basename(path)
-    if in_basename.endswith(".c"):
-        link_gxx = ''
-    in_path = os.path.join(plugin_dir, in_basename)
-    out_basename = os.path.splitext(in_basename)[0] + '.so'
-    out_path = os.path.join(plugin_dir, out_basename)
-    tsproc.Setup.RunCommand(
-        "{pre_args} {tsxs} {args} -c {0} -o {1}".format(
-            in_path,
-            out_path,
-            tsxs=tsxs,
-            args=" -L {0} {1}".format(self.Variables.LIBDIR, extra_build_args),
-            pre_args=link_gxx)
-    )
+    filename, extension = os.path.splitext(so_path)
+    if extension != ".so":
+        raise ValueError('so_path argument must have a ".so" extension. '
+                         'Received: {}'.format(so_path))
+
+    # Copy the shared object to the sandbox directory.
+    plugin_dir = tsproc.Env['PROXY_CONFIG_PLUGIN_PLUGIN_DIR']
+    tsproc.Setup.Copy(so_path, plugin_dir)
 
     # Add an entry to plugin.config.
-    tsproc.Disk.plugin_config.AddLine("{0} {1}".format(out_basename,plugin_args))
+    basename = os.path.basename(so_path)
+    tsproc.Disk.plugin_config.AddLine("{0} {1}".format(basename, plugin_args))
 
-# remove this later
-ExtendTest(prepare_plugin, name="prepare_plugin")
 
 ExtendTest(prepare_plugin, name="PreparePlugin")
diff --git a/tests/gold_tests/body_factory/http204_response_plugin.test.py b/tests/gold_tests/body_factory/http204_response_plugin.test.py
index 1890770..f7ed9dc 100644
--- a/tests/gold_tests/body_factory/http204_response_plugin.test.py
+++ b/tests/gold_tests/body_factory/http204_response_plugin.test.py
@@ -37,7 +37,7 @@ ts.Disk.remap_config.AddLine(
 )
 ts.Disk.MakeConfigFile(regex_remap_conf_file).AddLine('//.*/ http://donotcare.test @status=204')
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'custom204plugin.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'custom204plugin.so'), ts)
 
 Test.Setup.Copy(os.path.join(os.pardir, os.pardir, 'tools', 'tcp_client.py'))
 Test.Setup.Copy('data')
diff --git a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py b/tests/gold_tests/chunked_encoding/Makefile.inc
similarity index 65%
copy from tests/gold_tests/pluginTest/cppapi/cppapi.test.py
copy to tests/gold_tests/chunked_encoding/Makefile.inc
index 809eb2a..b316b4b 100644
--- a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
+++ b/tests/gold_tests/chunked_encoding/Makefile.inc
@@ -14,16 +14,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-Test.Summary = '''
-Execute plugin with cppapi tests.
-'''
-
-ts = Test.MakeATSProcess("ts")
-
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_cppapi.cc', ts, extra_build_args='-l tscppapi')
-
-tr = Test.AddTestRun()
-tr.Processes.Default.StartBefore(Test.Processes.ts)
-tr.Processes.Default.Command = "echo run test_cppapi plugin"
-tr.Processes.Default.ReturnCode = 0
-tr.Processes.StillRunningAfter = ts
+noinst_PROGRAMS += gold_tests/chunked_encoding/smuggle-client
+gold_tests_chunked_encoding_smuggle_client_SOURCES = gold_tests/chunked_encoding/smuggle-client.c
+gold_tests_chunked_encoding_smuggle_client_LDADD = -lssl
diff --git a/tests/gold_tests/chunked_encoding/chunked_encoding.test.py b/tests/gold_tests/chunked_encoding/chunked_encoding.test.py
index 4e6df88..d4da19d 100644
--- a/tests/gold_tests/chunked_encoding/chunked_encoding.test.py
+++ b/tests/gold_tests/chunked_encoding/chunked_encoding.test.py
@@ -92,10 +92,9 @@ ts.Disk.ssl_multicert_config.AddLine(
     'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
 )
 
-# build test code
-tr = Test.Build(target='smuggle-client', sources=['smuggle-client.c'])
-tr.TimeOut = 5
-tr.Setup.Copy('smuggle-client.c')
+# smuggle-client is built via `make`. Here we copy the built binary down to the
+# test directory so that the test runs in this file can use it.
+Test.Setup.Copy('smuggle-client')
 
 # HTTP1.1 GET: www.example.com
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/command_argument/verify_global_plugin.test.py b/tests/gold_tests/command_argument/verify_global_plugin.test.py
index aa86b2d..7becc84 100644
--- a/tests/gold_tests/command_argument/verify_global_plugin.test.py
+++ b/tests/gold_tests/command_argument/verify_global_plugin.test.py
@@ -86,8 +86,8 @@ have the expected Plugin symbols.
 tr = Test.AddTestRun("Verify the requirement of our Plugin API.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'missing_ts_plugin_init.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'missing_ts_plugin_init.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
@@ -98,8 +98,9 @@ tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "ERROR: .*unable to find TSPluginInit function in",
     "Should warn about the need for the TSPluginInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
-                                                       "ERROR: .*unable to find TSPluginInit function in")
+ts.Disk.diags_log.Content = Testers.ContainsExpression(
+    "ERROR",
+    "ERROR: .*unable to find TSPluginInit function in")
 
 
 """
@@ -109,8 +110,8 @@ it doesn't have the global plugin symbols.
 tr = Test.AddTestRun("Verify a properly formed plugin works as expected.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'conf_remap_stripped.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'conf_remap_stripped.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
@@ -121,8 +122,9 @@ tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "ERROR: .*unable to find TSPluginInit function in",
     "Should warn about the need for the TSPluginInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
-                                                       "ERROR: .*unable to find TSPluginInit function in")
+ts.Disk.diags_log.Content = Testers.ContainsExpression(
+    "ERROR",
+    "ERROR: .*unable to find TSPluginInit function in")
 
 
 """
@@ -132,8 +134,8 @@ argument that has the definition for the expected Plugin symbols.
 tr = Test.AddTestRun("Verify a properly formed plugin works as expected.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'ssl_hook_test.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'ssl_hook_test.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
@@ -146,32 +148,6 @@ tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "Verification should succeed")
 
 
-def prepare_undefined_symbol_plugin(tsproc, path_c, path_cpp, path_h):
-    """
-    Intentionally create an SO file with an undefined symbol.
-
-    We've seen issues where a plugin is created in which a C++ file
-    includes a function declaration and then expects a definition
-    of the mangled version of that function. However, the definition
-    was created with a c-compiler and thus is not mangled. This
-    builds a plugin with just such an undefined mangled symbol.
-    """
-    plugin_dir = tsproc.Env['PROXY_CONFIG_PLUGIN_PLUGIN_DIR']
-    tsproc.Setup.Copy(path_c, plugin_dir)
-    tsproc.Setup.Copy(path_cpp, plugin_dir)
-    tsproc.Setup.Copy(path_h, plugin_dir)
-
-    in_basename = os.path.basename(path_c)
-    out_basename = os.path.splitext(in_basename)[0] + '.so'
-    out_path = os.path.join(plugin_dir, out_basename)
-    tsproc.Setup.RunCommand(
-        ("gcc -c -fPIC {path_c} -o {path_c}_o; "
-            "g++ -c -fPIC {path_cpp} -o {path_cpp}_o; "
-            "g++ {path_c}_o {path_cpp}_o -shared -o {out_path}").format(
-                **locals())
-    )
-
-
 """
 TEST: This is a regression test for a shared object file that doesn't have all
 of the required symbols defined because of a malformed interaction between C
@@ -179,20 +155,19 @@ and C++ files.
 """
 tr = Test.AddTestRun("Regression test for an undefined, mangled C++ symbol.")
 ts = create_ts_process()
-plugins_dir = os.path.join(Test.Variables.AtsTestToolsDir, 'plugins')
-prepare_undefined_symbol_plugin(
-    ts,
-    os.path.join(plugins_dir, 'missing_mangled_definition.c'),
-    os.path.join(plugins_dir, 'missing_mangled_definition.cc'),
-    os.path.join(plugins_dir, 'missing_mangled_definition.h'))
+plugin_filename = 'missing_mangled_definition.so'
+built_plugin_path = os.path.join(Test.Variables.AtsTestPluginsDir, plugin_filename)
+ats_plugin_dir = ts.Env['PROXY_CONFIG_PLUGIN_PLUGIN_DIR']
+ts.Setup.Copy(built_plugin_path, ats_plugin_dir)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
-    "traffic_server -C 'verify_global_plugin {filename}'".format(
-        filename="${PROXY_CONFIG_PLUGIN_PLUGIN_DIR}/missing_mangled_definition.so")
+    "traffic_server -C 'verify_global_plugin {plugin_path}'".format(
+        plugin_path=os.path.join(ats_plugin_dir, plugin_filename))
 tr.Processes.Default.ReturnCode = 1
 tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "ERROR: .*: undefined symbol: .*foo.*",
     "Should warn about the need for the TSPluginInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
-                                                       "ERROR: .*: undefined symbol: .*foo.*")
+ts.Disk.diags_log.Content = Testers.ContainsExpression(
+    "ERROR",
+    "ERROR: .*: undefined symbol: .*foo.*")
diff --git a/tests/gold_tests/command_argument/verify_remap_plugin.test.py b/tests/gold_tests/command_argument/verify_remap_plugin.test.py
index dc4dc16..8411425 100644
--- a/tests/gold_tests/command_argument/verify_remap_plugin.test.py
+++ b/tests/gold_tests/command_argument/verify_remap_plugin.test.py
@@ -86,8 +86,8 @@ have the expected Plugin symbols.
 tr = Test.AddTestRun("Verify the requirement of our Plugin API.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'missing_ts_plugin_init.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'missing_ts_plugin_init.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
@@ -98,8 +98,7 @@ tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "ERROR: .*missing required function TSRemapInit",
     "Should warn about the need for the TSRemapInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression(
-    "ERROR",
+ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
     "ERROR: .*missing required function TSRemapInit")
 
 
@@ -110,8 +109,8 @@ plugin symbols but not the remap ones.
 tr = Test.AddTestRun("Verify a global plugin argument produces warning.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'ssl_hook_test.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'ssl_hook_test.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
@@ -122,8 +121,7 @@ tr.Processes.Default.StartBefore(ts)
 tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
     "ERROR: .*missing required function TSRemapInit",
     "Should warn about the need for the TSRemapInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression(
-    "ERROR",
+ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
     "ERROR: .*missing required function TSRemapInit")
 
 
@@ -134,8 +132,8 @@ argument that has the definition for the expected Plugin symbols.
 tr = Test.AddTestRun("Verify a properly formed plugin works as expected.")
 ts = create_ts_process()
 Test.PreparePlugin(
-    os.path.join(Test.Variables.AtsTestToolsDir,
-                 'plugins', 'conf_remap_stripped.cc'),
+    os.path.join(Test.Variables.AtsTestPluginsDir,
+                 'conf_remap_stripped.so'),
     ts)
 tr.Processes.Default.Env = ts.Env
 tr.Processes.Default.Command = \
diff --git a/tests/gold_tests/cont_schedule/schedule.test.py b/tests/gold_tests/cont_schedule/schedule.test.py
index c82db17..bdbe4c4 100644
--- a/tests/gold_tests/cont_schedule/schedule.test.py
+++ b/tests/gold_tests/cont_schedule/schedule.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'cont_schedule.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'cont_schedule.so'), ts)
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/cont_schedule/schedule_on_pool.test.py b/tests/gold_tests/cont_schedule/schedule_on_pool.test.py
index 23a7373..b700649 100644
--- a/tests/gold_tests/cont_schedule/schedule_on_pool.test.py
+++ b/tests/gold_tests/cont_schedule/schedule_on_pool.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'cont_schedule.cc'), ts, 'pool')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'cont_schedule.so'), ts, 'pool')
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/cont_schedule/schedule_on_thread.test.py b/tests/gold_tests/cont_schedule/schedule_on_thread.test.py
index 59e5a81..8d625ac 100644
--- a/tests/gold_tests/cont_schedule/schedule_on_thread.test.py
+++ b/tests/gold_tests/cont_schedule/schedule_on_thread.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'cont_schedule.cc'), ts, 'thread')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'cont_schedule.so'), ts, 'thread')
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/cont_schedule/thread_affinity.test.py b/tests/gold_tests/cont_schedule/thread_affinity.test.py
index 619a3d8..cc40be4 100644
--- a/tests/gold_tests/cont_schedule/thread_affinity.test.py
+++ b/tests/gold_tests/cont_schedule/thread_affinity.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'cont_schedule.cc'), ts, 'affinity')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'cont_schedule.so'), ts, 'affinity')
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double.test.py
index 8f45426..9ad6d55 100644
--- a/tests/gold_tests/continuations/double.test.py
+++ b/tests/gold_tests/continuations/double.test.py
@@ -55,8 +55,8 @@ ts.Disk.records_config.update({
 })
 
 # add plugin to assist with test metrics
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
-                                'plugins', 'continuations_verify.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
+                                 'continuations_verify.so'), ts)
 
 comparator_command = '''
 if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get continuations_verify.{0}.close.2 | cut -d ' ' -f 2`" ; then\
diff --git a/tests/gold_tests/continuations/double_h2.test.py b/tests/gold_tests/continuations/double_h2.test.py
index 8102021..46b469a 100644
--- a/tests/gold_tests/continuations/double_h2.test.py
+++ b/tests/gold_tests/continuations/double_h2.test.py
@@ -65,8 +65,8 @@ ts.Disk.records_config.update({
 })
 
 # add plugin to assist with test metrics
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
-                                'plugins', 'continuations_verify.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
+                                 'continuations_verify.so'), ts)
 
 comparator_command = '''
 if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get continuations_verify.{0}.close.2 | cut -d ' ' -f 2`" ; then\
diff --git a/tests/gold_tests/continuations/openclose.test.py b/tests/gold_tests/continuations/openclose.test.py
index ff2760c..59d0ad6 100644
--- a/tests/gold_tests/continuations/openclose.test.py
+++ b/tests/gold_tests/continuations/openclose.test.py
@@ -35,8 +35,8 @@ request_header = {"headers": "GET / HTTP/1.1\r\nHost: oc.test\r\n\r\n",
 response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Length:0\r\n\r\n",
                    "timestamp": "1469733493.993", "body": ""}
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
-                                'plugins', 'ssntxnorder_verify.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
+                                'ssntxnorder_verify.so'), ts)
 
 # add response to the server dictionary
 server.addResponse("sessionfile.log", request_header, response_header)
diff --git a/tests/gold_tests/continuations/openclose_h2.test.py b/tests/gold_tests/continuations/openclose_h2.test.py
index 4a04eb9..e2c9c7f 100644
--- a/tests/gold_tests/continuations/openclose_h2.test.py
+++ b/tests/gold_tests/continuations/openclose_h2.test.py
@@ -43,8 +43,8 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-L
 ts.addSSLfile("ssl/server.pem")
 ts.addSSLfile("ssl/server.key")
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir,
-                                'plugins', 'ssntxnorder_verify.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
+                                'ssntxnorder_verify.so'), ts)
 
 # add response to the server dictionary
 server.addResponse("sessionfile.log", request_header, response_header)
diff --git a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py b/tests/gold_tests/continuations/plugins/Makefile.inc
similarity index 65%
copy from tests/gold_tests/pluginTest/cppapi/cppapi.test.py
copy to tests/gold_tests/continuations/plugins/Makefile.inc
index 809eb2a..f39c9af 100644
--- a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
+++ b/tests/gold_tests/continuations/plugins/Makefile.inc
@@ -14,16 +14,5 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-Test.Summary = '''
-Execute plugin with cppapi tests.
-'''
-
-ts = Test.MakeATSProcess("ts")
-
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_cppapi.cc', ts, extra_build_args='-l tscppapi')
-
-tr = Test.AddTestRun()
-tr.Processes.Default.StartBefore(Test.Processes.ts)
-tr.Processes.Default.Command = "echo run test_cppapi plugin"
-tr.Processes.Default.ReturnCode = 0
-tr.Processes.StillRunningAfter = ts
+noinst_LTLIBRARIES += gold_tests/continuations/plugins/session_id_verify.la
+gold_tests_continuations_plugins_session_id_verify_la_SOURCES = gold_tests/continuations/plugins/session_id_verify.cc
diff --git a/tests/gold_tests/logging/log_retention.test.py b/tests/gold_tests/logging/log_retention.test.py
index 46fe386..f9da6a8 100644
--- a/tests/gold_tests/logging/log_retention.test.py
+++ b/tests/gold_tests/logging/log_retention.test.py
@@ -251,7 +251,7 @@ test.tr.StillRunningAfter = test.server
 #
 test = TestLogRetention(twelve_meg_log_space,
                         "Verify log rotation and deletion of plugin logs.")
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'test_log_interface.cc'), test.ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'test_log_interface.so'), test.ts)
 
 # Verify that the plugin's logs and other core logs were registered for deletion.
 test.ts.Streams.stderr = Testers.ContainsExpression(
diff --git a/tests/gold_tests/null_transform/null_transform.test.py b/tests/gold_tests/null_transform/null_transform.test.py
index 17f9bad..26ab4a9 100644
--- a/tests/gold_tests/null_transform/null_transform.test.py
+++ b/tests/gold_tests/null_transform/null_transform.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
 )
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'null_transform.c'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'null_transform.so'), ts)
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py
index c32d299..3ae57ba 100644
--- a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py
+++ b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py
@@ -17,6 +17,9 @@ Test the cert_update plugin.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Test cert_update plugin.
 '''
@@ -73,7 +76,7 @@ ts.Disk.sni_yaml.AddLines([
 ])
 
 # Set up plugin
-Test.PreparePlugin(Test.Variables.AtsExampleDir + '/plugins/c-api/cert_update/cert_update.cc', ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsExampleDir, 'plugins', 'c-api', '.libs', 'cert_update.so'), ts)
 
 # Server-Cert-Pre
 # curl should see that Traffic Server presents bar.com cert from alice
diff --git a/tests/gold_tests/pluginTest/client_context_dump/client_context_dump.test.py b/tests/gold_tests/pluginTest/client_context_dump/client_context_dump.test.py
index 89d676f..69adfaf 100644
--- a/tests/gold_tests/pluginTest/client_context_dump/client_context_dump.test.py
+++ b/tests/gold_tests/pluginTest/client_context_dump/client_context_dump.test.py
@@ -17,6 +17,9 @@ Test the client_context_dump plugin.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Test client_context_dump plugin
 '''
@@ -50,7 +53,7 @@ ts.Disk.sni_yaml.AddLines([
 ])
 
 # Set up plugin
-Test.PreparePlugin(Test.Variables.AtsExampleDir + '/plugins/c-api/client_context_dump/client_context_dump.cc', ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsExampleDir, 'plugins', 'c-api', '.libs', 'client_context_dump.so'), ts)
 
 # custom log comparison.  Verify the two certs we have loaded are dumped
 log = Test.Disk.File(ts.Variables.LOGDIR + '/client_context_dump.log', exists=True)
diff --git a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py b/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
index 809eb2a..07eb80f 100644
--- a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
+++ b/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
@@ -14,13 +14,16 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Execute plugin with cppapi tests.
 '''
 
 ts = Test.MakeATSProcess("ts")
 
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_cppapi.cc', ts, extra_build_args='-l tscppapi')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'test_cppapi.so'), ts)
 
 tr = Test.AddTestRun()
 tr.Processes.Default.StartBefore(Test.Processes.ts)
diff --git a/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py b/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py
index 5490e83..3e18fb4 100644
--- a/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py
+++ b/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py
@@ -14,6 +14,9 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Test adding hooks
 '''
@@ -36,7 +39,7 @@ ts.Disk.records_config.update({
     'proxy.config.url_remap.remap_required': 0,
 })
 
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/hook_add_plugin.cc', ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'hook_add_plugin.so'), ts)
 
 ts.Disk.remap_config.AddLine(
     "map http://one http://127.0.0.1:{0}".format(server.Variables.Port)
diff --git a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
index c56f0f2..eaf478d 100644
--- a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
+++ b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py
@@ -14,6 +14,9 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Test TS API Hooks.
 '''
@@ -52,7 +55,7 @@ ts.Disk.ssl_multicert_config.AddLine(
     'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key'
 )
 
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_hooks.cc', ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'test_hooks.so'), ts)
 
 ts.Disk.remap_config.AddLine(
     "map http://one http://127.0.0.1:{0}".format(server.Variables.Port)
diff --git a/tests/gold_tests/pluginTest/tsapi/tsapi.test.py b/tests/gold_tests/pluginTest/tsapi/tsapi.test.py
index c8466b0..ad470b8 100644
--- a/tests/gold_tests/pluginTest/tsapi/tsapi.test.py
+++ b/tests/gold_tests/pluginTest/tsapi/tsapi.test.py
@@ -14,6 +14,9 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
+import os
+
+
 Test.Summary = '''
 Test TS API.
 '''
@@ -59,7 +62,7 @@ ts.Disk.remap_config.AddLine(
     "map https://myhost.test:{0}  http://127.0.0.1:{0}".format(server.Variables.Port)
 )
 
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_tsapi.cc', ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'test_tsapi.so'), ts)
 
 tr = Test.AddTestRun()
 # Probe server port to check if ready.
diff --git a/tests/gold_tests/shutdown/emergency.test.py b/tests/gold_tests/shutdown/emergency.test.py
index 5092412..21c8744 100644
--- a/tests/gold_tests/shutdown/emergency.test.py
+++ b/tests/gold_tests/shutdown/emergency.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'emergency_shutdown.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'emergency_shutdown.so'), ts)
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/shutdown/fatal.test.py b/tests/gold_tests/shutdown/fatal.test.py
index 3a89239..fffeb9e 100644
--- a/tests/gold_tests/shutdown/fatal.test.py
+++ b/tests/gold_tests/shutdown/fatal.test.py
@@ -38,7 +38,7 @@ ts.Disk.records_config.update({
 })
 
 # Load plugin
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'fatal_shutdown.cc'), ts)
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'fatal_shutdown.so'), ts)
 
 # www.example.com Host
 tr = Test.AddTestRun()
diff --git a/tests/gold_tests/slow_post/slow_post.test.py b/tests/gold_tests/slow_post/slow_post.test.py
index f683c2b..47240c9 100644
--- a/tests/gold_tests/slow_post/slow_post.test.py
+++ b/tests/gold_tests/slow_post/slow_post.test.py
@@ -48,7 +48,7 @@ class SlowPostAttack:
             'map / http://127.0.0.1:{0}'.format(self._server.Variables.Port)
         )
         # This plugin can enable request buffer for POST.
-        Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'request_buffer.c'), self._ts)
+        Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'request_buffer.so'), self._ts)
         self._ts.Disk.records_config.update({
             'proxy.config.diags.debug.enabled': 1,
             'proxy.config.diags.debug.tags': 'http',
diff --git a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py b/tests/gold_tests/tls/Makefile.inc
similarity index 65%
copy from tests/gold_tests/pluginTest/cppapi/cppapi.test.py
copy to tests/gold_tests/tls/Makefile.inc
index 809eb2a..f0990ff 100644
--- a/tests/gold_tests/pluginTest/cppapi/cppapi.test.py
+++ b/tests/gold_tests/tls/Makefile.inc
@@ -14,16 +14,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-Test.Summary = '''
-Execute plugin with cppapi tests.
-'''
-
-ts = Test.MakeATSProcess("ts")
-
-Test.PreparePlugin(Test.Variables.AtsTestToolsDir + '/plugins/test_cppapi.cc', ts, extra_build_args='-l tscppapi')
-
-tr = Test.AddTestRun()
-tr.Processes.Default.StartBefore(Test.Processes.ts)
-tr.Processes.Default.Command = "echo run test_cppapi plugin"
-tr.Processes.Default.ReturnCode = 0
-tr.Processes.StillRunningAfter = ts
+noinst_PROGRAMS += gold_tests/tls/ssl-post
+gold_tests_tls_ssl_post_SOURCES = gold_tests/tls/ssl-post.c
+gold_tests_tls_ssl_post_LDADD = -lssl -lcrypto
diff --git a/tests/gold_tests/tls/ssl-post.c b/tests/gold_tests/tls/ssl-post.c
index bcac9d5..58376fd 100644
--- a/tests/gold_tests/tls/ssl-post.c
+++ b/tests/gold_tests/tls/ssl-post.c
@@ -31,6 +31,7 @@
 #include <string.h>
 #include <openssl/ssl.h>
 #include <fcntl.h>
+#include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <pthread.h>
 
@@ -58,11 +59,18 @@ SSL_locking_callback(int mode, int type, const char *file, int line)
   }
 }
 
+// In OpenSSL 1.1, locking and thread id logic was changed and the
+// CRYPTO_THREADID_set_callback function became a macro defined to be 0. In
+// later versions, therefore, static analysis tools flag the use of this as a
+// problem. Thus in order to see whether CRYPTO_THREADID_set_callback is a
+// valid function we check that it is not a defined macro.
+#if !defined(CRYPTO_THREADID_set_callback)
 void
 SSL_pthreads_thread_id(CRYPTO_THREADID *id)
 {
   CRYPTO_THREADID_set_numeric(id, (unsigned long)pthread_self());
 }
+#endif
 
 void *
 spawn_same_session_send(void *arg)
@@ -280,7 +288,12 @@ main(int argc, char *argv[])
   }
 
   CRYPTO_set_locking_callback(SSL_locking_callback);
+
+// See the '!defined(CRYPTO_THREADID_set_callback)' comment above for why we
+// test for !defined here.
+#if !defined(CRYPTO_THREADID_set_callback)
   CRYPTO_THREADID_set_callback(SSL_pthreads_thread_id);
+#endif
 
   SSL_CTX *client_ctx = SSL_CTX_new(SSLv23_client_method());
   SSL *ssl            = SSL_new(client_ctx);
@@ -291,6 +304,12 @@ main(int argc, char *argv[])
   SSL_set_fd(ssl, sfd);
   int ret = SSL_connect(ssl);
 
+  if (ret <= 0) {
+    int error = SSL_get_error(ssl, ret);
+    printf("SSL_connect failed %d", error);
+    exit(1);
+  }
+
   printf("Sent request\n");
   if ((ret = SSL_write(ssl, req_buf, strlen(req_buf))) <= 0) {
     int error = SSL_get_error(ssl, ret);
diff --git a/tests/gold_tests/tls/tls.test.py b/tests/gold_tests/tls/tls.test.py
index 1285007..3e31200 100644
--- a/tests/gold_tests/tls/tls.test.py
+++ b/tests/gold_tests/tls/tls.test.py
@@ -24,9 +24,9 @@ Test tls
 ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True)
 server = Test.MakeOriginServer("server")
 
-# build test code
-tr = Test.Build(target='ssl-post', sources=['ssl-post.c'])
-tr.Setup.Copy('ssl-post.c')
+# ssl-post is built via `make`. Here we copy the built binary down to the test
+# directory so that the test runs in this file can use it.
+Test.Setup.Copy('ssl-post')
 
 requestLocation = "test2"
 reHost = "www.example.com"
diff --git a/tests/gold_tests/tls/tls_hooks_client_verify.test.py b/tests/gold_tests/tls/tls_hooks_client_verify.test.py
index 5073a09..0eecded 100644
--- a/tests/gold_tests/tls/tls_hooks_client_verify.test.py
+++ b/tests/gold_tests/tls/tls_hooks_client_verify.test.py
@@ -70,13 +70,7 @@ ts.Disk.sni_yaml.AddLines([
     '  verify_client: STRICT',
 ])
 
-Test.PreparePlugin(
-    os.path.join(
-        Test.Variables.AtsTestToolsDir,
-        'plugins',
-        'ssl_client_verify_test.cc'),
-    ts,
-    '-count=2 -good=foo.com')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_client_verify_test.so'), ts, '-count=2 -good=foo.com')
 
 tr = Test.AddTestRun("request good name")
 tr.Setup.Copy("ssl/signed-foo.pem")
diff --git a/tests/gold_tests/tls/tls_hooks_verify.test.py b/tests/gold_tests/tls/tls_hooks_verify.test.py
index a17be4f..85f7790 100644
--- a/tests/gold_tests/tls/tls_hooks_verify.test.py
+++ b/tests/gold_tests/tls/tls_hooks_verify.test.py
@@ -65,13 +65,7 @@ ts.Disk.sni_yaml.AddLine(
 ts.Disk.sni_yaml.AddLine(
     '  verify_server_policy: PERMISSIVE')
 
-Test.PreparePlugin(
-    os.path.join(
-        Test.Variables.AtsTestToolsDir,
-        'plugins',
-        'ssl_verify_test.cc'),
-    ts,
-    '-count=2 -bad=random.com -bad=bar.com')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_verify_test.so'), ts, '-count=2 -bad=random.com -bad=bar.com')
 
 tr = Test.AddTestRun("request good name")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls/tls_keepalive.test.py b/tests/gold_tests/tls/tls_keepalive.test.py
index b201463..a31c0d2 100644
--- a/tests/gold_tests/tls/tls_keepalive.test.py
+++ b/tests/gold_tests/tls/tls_keepalive.test.py
@@ -67,7 +67,7 @@ logging:
 '''.split("\n")
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-preaccept=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-preaccept=1')
 
 tr = Test.AddTestRun("Test two HTTP/1.1 requests over one TLS connection")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks.test.py b/tests/gold_tests/tls_hooks/tls_hooks.test.py
index c1d7ee8..ff16a35 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks.test.py
@@ -52,7 +52,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-preaccept=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-preaccept=1')
 
 tr = Test.AddTestRun("Test one preaccept hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks10.test.py b/tests/gold_tests/tls_hooks/tls_hooks10.test.py
index 45f34ee..3e1e1c3 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks10.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks10.test.py
@@ -50,7 +50,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-cert=1 -i=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-cert=1 -i=2')
 
 tr = Test.AddTestRun("Test a combination of delayed and immediate cert hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks11.test.py b/tests/gold_tests/tls_hooks/tls_hooks11.test.py
index 04f5a1b..d6cb2ec 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks11.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks11.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-d=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-d=1')
 
 tr = Test.AddTestRun("Test one delayed preaccept hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks12.test.py b/tests/gold_tests/tls_hooks/tls_hooks12.test.py
index 2c9ab81..ab0604f 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks12.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks12.test.py
@@ -50,7 +50,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-p=2 -d=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-p=2 -d=1')
 
 tr = Test.AddTestRun("Test combination of delayed and immediate preaccept hook2")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks13.test.py b/tests/gold_tests/tls_hooks/tls_hooks13.test.py
index 71fb3b5..494572f 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks13.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks13.test.py
@@ -50,7 +50,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} https://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.SSL_Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-out_start=1 -out_close=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-out_start=1 -out_close=2')
 
 tr = Test.AddTestRun("Test outbound start and close")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks14.test.py b/tests/gold_tests/tls_hooks/tls_hooks14.test.py
index c7bc111..7e31747 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks14.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks14.test.py
@@ -50,7 +50,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} https://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.SSL_Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-out_start_delay=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-out_start_delay=2')
 
 tr = Test.AddTestRun("Test outbound delay start")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks15.test.py b/tests/gold_tests/tls_hooks/tls_hooks15.test.py
index aa30ffc..5ab8abd 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks15.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks15.test.py
@@ -50,7 +50,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} https://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.SSL_Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-close=2 -out_close=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-close=2 -out_close=1')
 
 tr = Test.AddTestRun("Test one delayed preaccept hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks16.test.py b/tests/gold_tests/tls_hooks/tls_hooks16.test.py
index 22f03d3..8032eda 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks16.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks16.test.py
@@ -54,7 +54,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{1} http://127.0.0.1:{0}'.format(server.Variables.Port, ts.Variables.ssl_port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-client_hello_imm=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-client_hello_imm=1')
 
 tr = Test.AddTestRun("Test one immediate client hello hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks17.test.py b/tests/gold_tests/tls_hooks/tls_hooks17.test.py
index 0fddd75..08cc0fc 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks17.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks17.test.py
@@ -54,7 +54,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{1} http://127.0.0.1:{0}'.format(server.Variables.Port, ts.Variables.ssl_port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-client_hello=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-client_hello=1')
 
 tr = Test.AddTestRun("Test one delayed client hello hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks18.test.py b/tests/gold_tests/tls_hooks/tls_hooks18.test.py
index 9593b8e..bea4b29 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks18.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks18.test.py
@@ -55,7 +55,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{1} http://127.0.0.1:{0}'.format(server.Variables.Port, ts.Variables.ssl_port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-client_hello=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-client_hello=2')
 
 tr = Test.AddTestRun("Test two client hello hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks2.test.py b/tests/gold_tests/tls_hooks/tls_hooks2.test.py
index 80c3ed1..c4b744b 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks2.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks2.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-sni=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-sni=1')
 
 tr = Test.AddTestRun("Test one sni hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks3.test.py b/tests/gold_tests/tls_hooks/tls_hooks3.test.py
index 624cb4d..3e39466 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks3.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks3.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-cert=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-cert=1')
 
 tr = Test.AddTestRun("Test one cert hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks4.test.py b/tests/gold_tests/tls_hooks/tls_hooks4.test.py
index a78ef39..26b0613 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks4.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks4.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-cert=1 -sni=1 -preaccept=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-cert=1 -sni=1 -preaccept=1')
 
 tr = Test.AddTestRun("Test one sni, one preaccept, and one cert hook")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks6.test.py b/tests/gold_tests/tls_hooks/tls_hooks6.test.py
index 939aa1e..6f13964 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks6.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks6.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-preaccept=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-preaccept=2')
 
 tr = Test.AddTestRun("Test two preaccept hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks7.test.py b/tests/gold_tests/tls_hooks/tls_hooks7.test.py
index 278dd50..06a9a37 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks7.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks7.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-sni=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-sni=2')
 
 tr = Test.AddTestRun("Test two sni hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks8.test.py b/tests/gold_tests/tls_hooks/tls_hooks8.test.py
index 72b194c..a1702c7 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks8.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks8.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-cert=2')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-cert=2')
 
 tr = Test.AddTestRun("Test two cert hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls_hooks/tls_hooks9.test.py b/tests/gold_tests/tls_hooks/tls_hooks9.test.py
index efdcb16..6d154b3 100644
--- a/tests/gold_tests/tls_hooks/tls_hooks9.test.py
+++ b/tests/gold_tests/tls_hooks/tls_hooks9.test.py
@@ -51,7 +51,7 @@ ts.Disk.remap_config.AddLine(
     'map https://example.com:{0} http://127.0.0.1:{1}'.format(ts.Variables.ssl_port, server.Variables.Port)
 )
 
-Test.PreparePlugin(os.path.join(Test.Variables.AtsTestToolsDir, 'plugins', 'ssl_hook_test.cc'), ts, '-i=1')
+Test.PreparePlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_hook_test.so'), ts, '-i=1')
 
 tr = Test.AddTestRun("Test one immediate cert hooks")
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/tools/plugins/Makefile.inc b/tests/tools/plugins/Makefile.inc
new file mode 100644
index 0000000..7282490
--- /dev/null
+++ b/tests/tools/plugins/Makefile.inc
@@ -0,0 +1,85 @@
+#  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.
+
+noinst_LTLIBRARIES += tools/plugins/cert_update.la
+tools_plugins_cert_update_la_SOURCES = tools/plugins/cert_update.cc
+
+noinst_LTLIBRARIES += tools/plugins/conf_remap_stripped.la
+tools_plugins_conf_remap_stripped_la_SOURCES = tools/plugins/conf_remap_stripped.cc
+
+noinst_LTLIBRARIES += tools/plugins/continuations_verify.la
+tools_plugins_continuations_verify_la_SOURCES = tools/plugins/continuations_verify.cc
+
+noinst_LTLIBRARIES += tools/plugins/cont_schedule.la
+tools_plugins_cont_schedule_la_SOURCES = tools/plugins/cont_schedule.cc
+
+noinst_LTLIBRARIES += tools/plugins/custom204plugin.la
+tools_plugins_custom204plugin_la_SOURCES = tools/plugins/custom204plugin.cc
+
+noinst_LTLIBRARIES += tools/plugins/emergency_shutdown.la
+tools_plugins_emergency_shutdown_la_SOURCES = tools/plugins/emergency_shutdown.cc
+
+noinst_LTLIBRARIES += tools/plugins/fatal_shutdown.la
+tools_plugins_fatal_shutdown_la_SOURCES = tools/plugins/fatal_shutdown.cc
+
+noinst_LTLIBRARIES += tools/plugins/hook_add_plugin.la
+tools_plugins_hook_add_plugin_la_SOURCES = tools/plugins/hook_add_plugin.cc
+
+noinst_LTLIBRARIES += tools/plugins/missing_mangled_definition.la
+tools_plugins_missing_mangled_definition_la_SOURCES = \
+  tools/plugins/missing_mangled_definition_c.c \
+  tools/plugins/missing_mangled_definition_cpp.cc \
+  tools/plugins/missing_mangled_definition.h
+
+noinst_LTLIBRARIES += tools/plugins/missing_ts_plugin_init.la
+tools_plugins_missing_ts_plugin_init_la_SOURCES = tools/plugins/missing_ts_plugin_init.cc
+
+noinst_LTLIBRARIES += tools/plugins/null_transform.la
+tools_plugins_null_transform_la_SOURCES = tools/plugins/null_transform.c
+
+noinst_LTLIBRARIES += tools/plugins/request_buffer.la
+tools_plugins_request_buffer_la_SOURCES = tools/plugins/request_buffer.cc
+
+noinst_LTLIBRARIES += tools/plugins/ssl_client_verify_test.la
+tools_plugins_ssl_client_verify_test_la_SOURCES = tools/plugins/ssl_client_verify_test.cc
+
+noinst_LTLIBRARIES += tools/plugins/ssl_hook_test.la
+tools_plugins_ssl_hook_test_la_SOURCES = tools/plugins/ssl_hook_test.cc
+
+noinst_LTLIBRARIES += tools/plugins/ssl_verify_test.la
+tools_plugins_ssl_verify_test_la_SOURCES = tools/plugins/ssl_verify_test.cc
+
+noinst_LTLIBRARIES += tools/plugins/ssntxnorder_verify.la
+tools_plugins_ssntxnorder_verify_la_SOURCES = tools/plugins/ssntxnorder_verify.cc
+
+noinst_LTLIBRARIES += tools/plugins/test_cppapi.la
+tools_plugins_test_cppapi_la_SOURCES = tools/plugins/test_cppapi.cc
+tools_plugins_test_cppapi_la_LDFLAGS = \
+  $(AM_LDFLAGS) \
+  -L$(top_builddir)/src/tscpp/api
+tools_plugins_test_cppapi_la_LIBADD = -ltscppapi
+
+noinst_LTLIBRARIES += tools/plugins/test_hooks.la
+tools_plugins_test_hooks_la_SOURCES = tools/plugins/test_hooks.cc
+
+noinst_LTLIBRARIES += tools/plugins/test_log_interface.la
+tools_plugins_test_log_interface_la_SOURCES = tools/plugins/test_log_interface.cc
+
+noinst_LTLIBRARIES += tools/plugins/test_tsapi.la
+tools_plugins_test_tsapi_la_SOURCES = tools/plugins/test_tsapi.cc
+
+noinst_LTLIBRARIES += tools/plugins/user_args.la
+tools_plugins_user_args_la_SOURCES = tools/plugins/user_args.cc
diff --git a/tests/tools/plugins/missing_mangled_definition.c b/tests/tools/plugins/missing_mangled_definition_c.c
similarity index 100%
rename from tests/tools/plugins/missing_mangled_definition.c
rename to tests/tools/plugins/missing_mangled_definition_c.c
diff --git a/tests/tools/plugins/missing_mangled_definition.cc b/tests/tools/plugins/missing_mangled_definition_cpp.cc
similarity index 100%
rename from tests/tools/plugins/missing_mangled_definition.cc
rename to tests/tools/plugins/missing_mangled_definition_cpp.cc
diff --git a/tests/tools/plugins/ssl_client_verify_test.cc b/tests/tools/plugins/ssl_client_verify_test.cc
index c6967f7..17668b2 100644
--- a/tests/tools/plugins/ssl_client_verify_test.cc
+++ b/tests/tools/plugins/ssl_client_verify_test.cc
@@ -64,8 +64,12 @@ check_names(X509 *cert)
 
       X509_NAME_ENTRY *e = X509_NAME_get_entry(subject, pos);
       ASN1_STRING *cn    = X509_NAME_ENTRY_get_data(e);
-      char *subj_name    = strndup(reinterpret_cast<const char *>(ASN1_STRING_get0_data(cn)), ASN1_STRING_length(cn));
-      retval             = check_name(subj_name);
+#if OPENSSL_VERSION_NUMBER >= 0x010100000
+      char *subj_name = strndup(reinterpret_cast<const char *>(ASN1_STRING_get0_data(cn)), ASN1_STRING_length(cn));
+#else
+      char *subj_name = strndup(reinterpret_cast<const char *>(ASN1_STRING_data(cn)), ASN1_STRING_length(cn));
+#endif
+      retval = check_name(subj_name);
       free(subj_name);
     }
   }
@@ -80,7 +84,11 @@ check_names(X509 *cert)
         name = sk_GENERAL_NAME_value(names, i);
         if (name->type == GEN_DNS) {
           char *dns =
+#if OPENSSL_VERSION_NUMBER >= 0x010100000
             strndup(reinterpret_cast<const char *>(ASN1_STRING_get0_data(name->d.dNSName)), ASN1_STRING_length(name->d.dNSName));
+#else
+            strndup(reinterpret_cast<const char *>(ASN1_STRING_data(name->d.dNSName)), ASN1_STRING_length(name->d.dNSName));
+#endif
           retval = check_name(dns);
           free(dns);
         }
diff --git a/tests/tools/plugins/test_cppapi.cc b/tests/tools/plugins/test_cppapi.cc
index c11865d..d87d0d1 100644
--- a/tests/tools/plugins/test_cppapi.cc
+++ b/tests/tools/plugins/test_cppapi.cc
@@ -115,9 +115,15 @@ f()
   ALWAYS_ASSERT(c2.asTSCont() != nullptr)
   ALWAYS_ASSERT(c2.mutex() == m)
 
+  // clang-analyzer warns about use-after-move for the following, but the
+  // atscppapi::Continuation API is designed to support use after move and this
+  // test intentionally exercises this behavior. Thus we disable clang-analyzer
+  // for this code.
+#ifndef __clang_analyzer__
   ALWAYS_ASSERT(!c)
   ALWAYS_ASSERT(c.asTSCont() == nullptr)
   ALWAYS_ASSERT(c.mutex() == nullptr)
+#endif
 
   TestCont c3;
 
@@ -131,9 +137,13 @@ f()
   ALWAYS_ASSERT(c3.asTSCont() != nullptr)
   ALWAYS_ASSERT(c3.mutex() == m)
 
+  // See the user-after-move comment above for the reason we disable
+  // clang-analyzer here.
+#ifndef __clang_analyzer__
   ALWAYS_ASSERT(!c2)
   ALWAYS_ASSERT(c2.asTSCont() == nullptr)
   ALWAYS_ASSERT(c2.mutex() == nullptr)
+#endif
 
   c3.destroy();