mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:17:28 +03:00
tests/http/clients: move to tests/client
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
This commit is contained in:
parent
260ec730c2
commit
9b7c488f17
21 changed files with 16 additions and 20 deletions
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -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 = \
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue