This is an automated email from the ASF dual-hosted git repository. shinrich 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 fec9edb Change Au test condition for minimal OpenSSL version to use traffic_layout info --versions --json . fec9edb is described below commit fec9edba1763a40bfa0308fcae1842bee06307dc Author: Walter Karas <wka...@verizonmedia.com> AuthorDate: Tue Apr 16 14:55:45 2019 -0500 Change Au test condition for minimal OpenSSL version to use traffic_layout info --versions --json . --- tests/gold_tests/autest-site/conditions.test.ext | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/gold_tests/autest-site/conditions.test.ext b/tests/gold_tests/autest-site/conditions.test.ext index e60c06c..f2b0587 100644 --- a/tests/gold_tests/autest-site/conditions.test.ext +++ b/tests/gold_tests/autest-site/conditions.test.ext @@ -16,8 +16,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +import subprocess +import json +import re + def HasOpenSSLVersion(self, version): - return self.EnsureVersion(["openssl","version"],min_version=version) + output = subprocess.check_output( + os.path.join(self.Variables.BINDIR, "traffic_layout") + " info --versions --json", shell = True + ) + json_data = output.decode('utf-8') + openssl_str = json.loads(json_data)['openssl_str'] + exe_ver = re.search(r'\d\.\d\.\d', openssl_str).group(0) + if exe_ver == '': + raise ValueError("Error determining version of openssl library needed by traffic_server executable") + return self.Condition( + lambda: exe_ver >= version, + "openssl library version is " + exe_ver + ", must be at least " + version + ) def HasCurlVersion(self, version): return self.EnsureVersion(["curl","--version"],min_version=version)