mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:21:42 +03:00
tests: separate tunit tests from unit tests more
- unit tests need no tool code as they are libcurl unit tests - unit test 1621 is now tunit test 1621 instead, as it tests tool code - build unit tests with BUILDING_LIBCURL as they pretent to be libcurl Closes #17259
This commit is contained in:
parent
2e49965126
commit
220eda34cd
7 changed files with 12 additions and 9 deletions
|
|
@ -19,5 +19,8 @@ https
|
|||
<name>
|
||||
unit tests for stripcredentials from URL
|
||||
</name>
|
||||
<tool>
|
||||
tool%TESTNUMBER
|
||||
</tool>
|
||||
</client>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ FIRSTFILES = ../libtest/first.c
|
|||
TOOLFILES = $(FIRSTFILES)
|
||||
|
||||
# These are all tool unit test programs
|
||||
TOOLPROGS = tool1394 tool1604
|
||||
TOOLPROGS = tool1394 tool1604 tool1621
|
||||
|
||||
tool1394_SOURCES = tool1394.c $(TOOLFILES)
|
||||
|
||||
tool1604_SOURCES = tool1604.c $(TOOLFILES)
|
||||
|
||||
tool1621_SOURCES = tool1621.c $(TOOLFILES)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ if(CURL_TEST_BUNDLES)
|
|||
set(units_SOURCES "unit_bundle.c")
|
||||
endif()
|
||||
|
||||
# unit tests are small pretend-libcurl-programs
|
||||
list(APPEND CURL_DEBUG_MACROS "BUILDING_LIBCURL")
|
||||
|
||||
foreach(_target IN LISTS UNITPROGS)
|
||||
set(_target_name "${_target}")
|
||||
add_executable(${_target_name} EXCLUDE_FROM_ALL ${${_target}_SOURCES})
|
||||
|
|
|
|||
|
|
@ -46,11 +46,10 @@ CFLAGS += @CURL_CFLAG_EXTRAS@
|
|||
# Prevent LIBS from being used for all link targets
|
||||
LIBS = $(BLANK_AT_MAKETIME)
|
||||
|
||||
LDADD = $(top_builddir)/src/libcurltool.la \
|
||||
$(top_builddir)/lib/libcurlu.la \
|
||||
LDADD = $(top_builddir)/lib/libcurlu.la \
|
||||
@LIBCURL_PC_LDFLAGS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@
|
||||
|
||||
AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS
|
||||
AM_CPPFLAGS += -DCURL_STATICLIB -DUNITTESTS -DBUILDING_LIBCURL
|
||||
if DEBUGBUILD
|
||||
AM_CPPFLAGS += -DDEBUGBUILD
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ UNITPROGS = unit1300 unit1302 unit1303 unit1304 unit1305 unit1307 \
|
|||
unit1399 \
|
||||
unit1600 unit1601 unit1602 unit1603 unit1605 unit1606 unit1607 \
|
||||
unit1608 unit1609 unit1610 unit1611 unit1612 unit1614 unit1615 unit1616 \
|
||||
unit1620 unit1621 \
|
||||
unit1620 \
|
||||
unit1650 unit1651 unit1652 unit1653 unit1654 unit1655 unit1656 unit1657 \
|
||||
unit1658 \
|
||||
unit1660 unit1661 unit1663 unit1664 \
|
||||
|
|
@ -106,8 +106,6 @@ unit1616_SOURCES = unit1616.c $(UNITFILES)
|
|||
|
||||
unit1620_SOURCES = unit1620.c $(UNITFILES)
|
||||
|
||||
unit1621_SOURCES = unit1621.c $(UNITFILES)
|
||||
|
||||
unit1650_SOURCES = unit1650.c $(UNITFILES)
|
||||
|
||||
unit1651_SOURCES = unit1651.c $(UNITFILES)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
#include "curlcheck.h"
|
||||
/* disable the curlx_get_line redefinitions for this unit test */
|
||||
#define BUILDING_LIBCURL
|
||||
#include "curl_get_line.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue