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 2021/11/08 23:26:33 UTC
[trafficserver] branch 9.2.x updated: bigobj: use automake to build
test utilities (#8441)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new d7a00f2 bigobj: use automake to build test utilities (#8441)
d7a00f2 is described below
commit d7a00f24ae1de8974745bb6e78df3a8148b7a3dd
Author: Randall Meyer <rr...@apache.org>
AuthorDate: Wed Oct 20 12:05:24 2021 -0700
bigobj: use automake to build test utilities (#8441)
Continuing the work originally done in 61f8ee3bfdea2690677d6ef3697b5aa272ffd297
(cherry picked from commit 441db31328ddea164a5157c3fd0dbe960611002e)
---
.gitignore | 2 ++
tests/Makefile.am | 1 +
tests/gold_tests/bigobj/Makefile.inc | 20 ++++++++++++++++++++
tests/gold_tests/bigobj/bigobj.test.py | 21 ++++++++-------------
4 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0de9256..3c027bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -203,6 +203,8 @@ RELEASE
tests/env-test/
tests/proxy-verifier
tests/Pipfile.lock
+tests/gold_tests/bigobj/check_ramp
+tests/gold_tests/bigobj/push_request
tests/gold_tests/chunked_encoding/smuggle-client
tests/gold_tests/tls/ssl-post
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cf03eed..3910788 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,6 +30,7 @@ AM_LDFLAGS += $(TS_PLUGIN_LD_FLAGS)
# generation of so objects for these test files.
AM_LDFLAGS += -rpath $(abs_builddir)
+include gold_tests/bigobj/Makefile.inc
include gold_tests/continuations/plugins/Makefile.inc
include gold_tests/chunked_encoding/Makefile.inc
include gold_tests/pluginTest/tsapi/Makefile.inc
diff --git a/tests/gold_tests/bigobj/Makefile.inc b/tests/gold_tests/bigobj/Makefile.inc
new file mode 100644
index 0000000..13a00f3
--- /dev/null
+++ b/tests/gold_tests/bigobj/Makefile.inc
@@ -0,0 +1,20 @@
+# 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_PROGRAMS += gold_tests/bigobj/check_ramp gold_tests/bigobj/push_request
+
+gold_tests_bigobj_check_ramp_SOURCES = gold_tests/bigobj/check_ramp.c
+gold_tests_bigobj_push_request_SOURCES = gold_tests/bigobj/push_request.c
diff --git a/tests/gold_tests/bigobj/bigobj.test.py b/tests/gold_tests/bigobj/bigobj.test.py
index a287ac1..cb79713 100644
--- a/tests/gold_tests/bigobj/bigobj.test.py
+++ b/tests/gold_tests/bigobj/bigobj.test.py
@@ -1,6 +1,3 @@
-'''
-Test PUSHing an object into the cache and the GETting it with a few variations on the client connection protocol.
-'''
# 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
@@ -17,11 +14,13 @@ Test PUSHing an object into the cache and the GETting it with a few variations o
# See the License for the specific language governing permissions and
# limitations under the License.
+import os
+
Test.Summary = '''
Test PUSHing an object into the cache and the GETting it with a few variations on the client connection protocol.
'''
-# NOTE: You can also use this to test client-side communication when GETting very large (multi-GB) objects
+# NOTE: You can also use this to test client-side communication when GET-ing very large (multi-GB) objects
# by increasing the value of the obj_kilobytes variable below. (But do not increase it on any shared branch
# that we do CI runs on.)
@@ -29,8 +28,12 @@ Test.SkipUnless(
Condition.HasCurlFeature('http2')
)
-ts = Test.MakeATSProcess("ts", enable_tls=True)
+# push_request and check_ramp are 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(os.path.join(Test.Variables.AtsBuildGoldTestsDir, 'bigobj', 'push_request'))
+Test.Setup.Copy(os.path.join(Test.Variables.AtsBuildGoldTestsDir, 'bigobj', 'check_ramp'))
+ts = Test.MakeATSProcess("ts", enable_tls=True)
ts.addDefaultSSLFiles()
ts.Disk.records_config.update({
@@ -64,14 +67,6 @@ log_id.Content = "log2.gold"
obj_kilobytes = 10 * 1024
tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'cc ' + Test.TestDirectory + '/push_request.c -o push_request'
-tr.Processes.Default.ReturnCode = 0
-
-tr = Test.AddTestRun()
-tr.Processes.Default.Command = 'cc ' + Test.TestDirectory + '/check_ramp.c -o check_ramp'
-tr.Processes.Default.ReturnCode = 0
-
-tr = Test.AddTestRun()
# Delay on readiness of TS IPv4 ssl port
tr.Processes.Default.StartBefore(Test.Processes.ts)
#