]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/http/clients: move to tests/client
authorViktor Szakats <commit@vsz.me>
Mon, 16 Jun 2025 10:42:19 +0000 (12:42 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 17 Jun 2025 17:39:36 +0000 (19:39 +0200)
To have all the tests binaries directly under the tests directory.

There seems to be no issue adding non-http test clients to this subdir.

Closes #17637

21 files changed:
.github/workflows/windows.yml
configure.ac
tests/CMakeLists.txt
tests/Makefile.am
tests/client/.gitignore [moved from tests/http/clients/.gitignore with 100% similarity]
tests/client/CMakeLists.txt [moved from tests/http/clients/CMakeLists.txt with 81% similarity]
tests/client/Makefile.am [moved from tests/http/clients/Makefile.am with 100% similarity]
tests/client/Makefile.inc [moved from tests/http/clients/Makefile.inc with 97% similarity]
tests/client/first.c [moved from tests/http/clients/first.c with 100% similarity]
tests/client/first.h [moved from tests/http/clients/first.h with 100% similarity]
tests/client/h2_pausing.c [moved from tests/http/clients/h2_pausing.c with 100% similarity]
tests/client/h2_serverpush.c [moved from tests/http/clients/h2_serverpush.c with 100% similarity]
tests/client/h2_upgrade_extreme.c [moved from tests/http/clients/h2_upgrade_extreme.c with 100% similarity]
tests/client/hx_download.c [moved from tests/http/clients/hx_download.c with 100% similarity]
tests/client/hx_upload.c [moved from tests/http/clients/hx_upload.c with 100% similarity]
tests/client/tls_session_reuse.c [moved from tests/http/clients/tls_session_reuse.c with 100% similarity]
tests/client/upload_pausing.c [moved from tests/http/clients/upload_pausing.c with 100% similarity]
tests/client/ws_data.c [moved from tests/http/clients/ws_data.c with 100% similarity]
tests/client/ws_pingpong.c [moved from tests/http/clients/ws_pingpong.c with 100% similarity]
tests/http/Makefile.am
tests/http/testenv/client.py

index fd8349e7fe6e4bc906c45dfd0bdc1493fc1405a2..4ddcae54e6cefcb8fdafb7b6248909bb10a04cc0 100644 (file)
@@ -353,7 +353,7 @@ jobs:
           fi
           if [ "${MATRIX_BUILD}" != 'cmake' ]; then
             # avoid libtool's .exe wrappers
-            mv bld/tests/http/clients/.libs/*.exe bld/tests/http/clients
+            mv bld/tests/client/.libs/*.exe bld/tests/client
             mv bld/tests/libtest/.libs/*.exe bld/tests/libtest
             mv bld/tests/server/.libs/*.exe bld/tests/server
             mv bld/tests/tunit/.libs/*.exe bld/tests/tunit || true
index d17811395560914956a59e3cc33516655cb76e97..0d5da0073e742c59c2dc169e1cbe00b6c1fa4cba 100644 (file)
@@ -5429,9 +5429,9 @@ AC_CONFIG_FILES([\
   tests/libtest/Makefile \
   tests/unit/Makefile \
   tests/tunit/Makefile \
+  tests/client/Makefile \
   tests/http/config.ini \
   tests/http/Makefile \
-  tests/http/clients/Makefile \
   packages/Makefile \
   packages/vms/Makefile \
   curl-config \
index 7928b206ebbb444455093d8bf7543946239ffe5b..0cf3e3752912f2c64ba8f956651c635085b91694 100644 (file)
@@ -35,7 +35,7 @@ if(BUILD_CURL_EXE)
 endif()
 
 add_subdirectory(http)
-add_subdirectory(http/clients)
+add_subdirectory(client)
 add_subdirectory(server)
 add_subdirectory(libtest)
 add_subdirectory(tunit)
@@ -73,7 +73,7 @@ endfunction()
 function(curl_add_pytests _targetname _test_flags)
   set(_depends "")
   if(NOT _targetname STREQUAL "pytest-ci")
-    set(_depends "http-clients")
+    set(_depends "clients")
   endif()
   string(REPLACE " " ";" _test_flags_list "${_test_flags}")
   add_custom_target(${_targetname}
index ed7c55e62e801bb7fe83c5f376b28c141b43fdb1..4978b059f9429b2b0da97d51f813cd8b67006c5a 100644 (file)
@@ -95,7 +95,7 @@ BUILD_UNIT =
 DIST_UNIT = unit tunit
 endif
 
-SUBDIRS = certs data server libtest http $(BUILD_UNIT)
+SUBDIRS = certs data server libtest client http $(BUILD_UNIT)
 DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
 
 PERLFLAGS = -I$(srcdir)
@@ -175,6 +175,7 @@ checksrc:
        (cd unit && $(MAKE) checksrc)
        (cd tunit && $(MAKE) checksrc)
        (cd server && $(MAKE) checksrc)
+       (cd client && $(MAKE) checksrc)
        (cd http && $(MAKE) checksrc)
 
 all-local: $(MANFILES) build-certs
similarity index 81%
rename from tests/http/clients/CMakeLists.txt
rename to tests/client/CMakeLists.txt
index f6c0fb137f8833388565c8e1069e70f8ddef15fd..91c3c0ec7b1094b6869ccf34719c532bee752011 100644 (file)
@@ -41,18 +41,18 @@ add_custom_command(
     ${FIRSTFILES} ${_bundle_extra} ${TESTFILES}
   VERBATIM)
 
-add_executable(http-clients EXCLUDE_FROM_ALL "${BUNDLE_SRC}")
-add_dependencies(testdeps http-clients)
-target_include_directories(http-clients PRIVATE
+add_executable(clients EXCLUDE_FROM_ALL "${BUNDLE_SRC}")
+add_dependencies(testdeps clients)
+target_include_directories(clients PRIVATE
   "${PROJECT_BINARY_DIR}/lib"            # for "curl_config.h"
   "${PROJECT_SOURCE_DIR}/lib"            # for "curl_setup.h"
   "${PROJECT_SOURCE_DIR}/lib/curlx"      # for curlx
   "${CMAKE_CURRENT_SOURCE_DIR}"          # for "first.h"
 )
-target_link_libraries(http-clients ${LIB_SELECTED} ${CURL_LIBS})
-set_property(TARGET http-clients APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES"
+target_link_libraries(clients ${LIB_SELECTED} ${CURL_LIBS})
+set_property(TARGET clients APPEND PROPERTY COMPILE_DEFINITIONS "CURL_NO_OLDIES"
   "$<$<BOOL:MSVC>:_CRT_SECURE_NO_DEPRECATE>")
 if(LIB_SELECTED STREQUAL LIB_STATIC AND WIN32)
-  set_property(TARGET http-clients APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")
+  set_property(TARGET clients APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")
 endif()
-set_target_properties(http-clients PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF)
+set_target_properties(clients PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF)
similarity index 97%
rename from tests/http/clients/Makefile.inc
rename to tests/client/Makefile.inc
index 52c63390ebb3ab926df810410d5783817005228c..604ff515c935f4d8c5699466111e95584b494b3c 100644 (file)
@@ -30,7 +30,7 @@ BUNDLE_SRC = clients.c
 FIRSTFILES = first.c first.h
 
 CURLX_SRCS = \
-  ../../../lib/curlx/multibyte.c
+  ../../lib/curlx/multibyte.c
 
 # All test clients
 TESTFILES = \
index f51fef44cf25577fb4cb34c3388ad4f4dcb8c41a..2a0c2547f4e84fabb356f40aba1e69bf84956663 100644 (file)
@@ -22,8 +22,6 @@
 #
 ###########################################################################
 
-SUBDIRS = clients
-
 TESTENV =                             \
 testenv/__init__.py                   \
 testenv/caddy.py                      \
@@ -75,7 +73,4 @@ clean-local:
 check: clients
 
 clients:
-       @(cd clients; $(MAKE) check)
-
-checksrc:
-       cd clients && $(MAKE) checksrc
+       @(cd ../client; $(MAKE) check)
index 0b2d9bb4a7069ee527da37cf3f1ea42109d31fec..4f690a345ecb5da496caa6113bead6f026fb595f 100644 (file)
@@ -44,7 +44,7 @@ class LocalClient:
                  timeout: Optional[float] = None,
                  run_env: Optional[Dict[str,str]] = None):
         self.name = name
-        self.path = os.path.join(env.build_dir, 'tests/http/clients/clients')
+        self.path = os.path.join(env.build_dir, 'tests/client/clients')
         self.env = env
         self._run_env = run_env
         self._timeout = timeout if timeout else env.test_timeout