You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by dr...@apache.org on 2017/10/09 20:13:09 UTC

[trafficserver] branch master updated: Fix prepare_plugin

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

dragon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 14c6d94  Fix prepare_plugin
14c6d94 is described below

commit 14c6d9412a08a25c05cad090aa895dd8b4c93a0e
Author: Unknown <jk...@oath.com>
AuthorDate: Fri Oct 6 14:28:52 2017 -0500

    Fix prepare_plugin
    
    Fix to get tsxs from the ats-bin directory and not assume the one in the path should be the one used
---
 tests/gold_tests/autest-site/trafficserver_plugins.test.ext | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/gold_tests/autest-site/trafficserver_plugins.test.ext b/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
index 9ba2718..3b801d8 100644
--- a/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver_plugins.test.ext
@@ -31,12 +31,20 @@ def prepare_plugin(self, path, tsproc, plugin_args = ""):
     plugin_dir = tsproc.Env['PROXY_CONFIG_PLUGIN_PLUGIN_DIR']
     tsproc.Setup.Copy(path, plugin_dir)
 
+    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")
+        )
+
     # Compile the plugin.
     in_basename = os.path.basename(path)
     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("tsxs -c {0} -o {1}".format(in_path, out_path))
+    tsproc.Setup.RunCommand("{tsxs} -c {0} -o {1}".format(in_path, out_path, tsxs=tsxs))
 
     # Add an entry to plugin.config.
     tsproc.Disk.plugin_config.AddLine("{0} {1}".format(out_basename,plugin_args))

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].