]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix test 558, 1330 for MSVC, allow TrackMemory with MSVC in cmake
authorViktor Szakats <commit@vsz.me>
Mon, 10 Feb 2025 18:39:41 +0000 (19:39 +0100)
committerViktor Szakats <commit@vsz.me>
Mon, 10 Feb 2025 21:35:15 +0000 (22:35 +0100)
Extend output filter to pick up backslashes. This makes them pass in CI
when run in the vcpkg MSVC job, for example.

Also:
- cmake: allow TrackMemory, aka `ENABLE_CURLDEBUG` again. Drop FIXME.
- cmake: drop stale TODO.
- runtests: include the word 'TrackMemory' in the message disabling it.

Follow-up to 9f23c8f201f55f1a148b41b16a5e71f3385faa5e #14541
Follow-up to 94c596bbc588ff5f37390754be778c47cd70cc91 #16283

Closes #16289

CMakeLists.txt
tests/data/test1330
tests/data/test558
tests/runtests.pl

index 6b4cc160a8306f49e43d9f87674113c1440b93ef..239a2c9e72a041d196fd569665cc19a8919a5485 100644 (file)
@@ -265,10 +265,6 @@ if(ENABLE_DEBUG)
 endif()
 option(ENABLE_CURLDEBUG "Enable TrackMemory debug feature" ${ENABLE_DEBUG})
 
-if(MSVC)
-  set(ENABLE_CURLDEBUG OFF)  # FIXME: TrackMemory + MSVC fails test 558 and 1330. Tested with static build, Debug mode.
-endif()
-
 if(ENABLE_DEBUG)
   set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "DEBUGBUILD")
 endif()
@@ -2196,7 +2192,6 @@ if(NOT CURL_DISABLE_INSTALL)
 
   # curl-config needs the following options to be set.
   set(CC                      "${CMAKE_C_COMPILER}")
-  # TODO: probably put a -D... options here?
   set(CONFIGURE_OPTIONS       "")
   set(CURLVERSION             "${_curl_version}")
   set(VERSIONNUM              "${_curl_version_num}")
index 0dd8f7d267674bf6d8abca8ad96813aeec29ab66..4e97162b5405593c359957220fc1cefedccb5dd9 100644 (file)
@@ -39,7 +39,7 @@ MEM unit%TESTNUMBER.c: free()
 s/ =.*//
 s/\(.*\)/()/
 s/:\d+/:/
-s:^(MEM )(.*/)(.*):$1$3:
+s:^(MEM )(.*[/\\])(.*):$1$3:
 s/\r\n/\n/
 s/^MEM getenv.c: realloc\(\)[\n]$//
 s/^MEM getenv.c: free\(\)[\n]$//
index 47605de0b027899e3ce0d83668e7894ccb9ceea4..a7d6129e9274da42f6e46d967f32d4c3400e5a77 100644 (file)
@@ -49,7 +49,7 @@ s/^MEM escape.c:\d+ free\(\(nil\)\)[\n]$//
 s/ =.*//
 s/\(.*\)/()/
 s/:\d+/:/
-s:^(MEM |FD )(.*/)(.*):$1$3:
+s:^(MEM |FD )(.*[/\\])(.*):$1$3:
 s/\r\n/\n/
 s/^MEM getenv.c: realloc\(\)[\n]$//
 s/^MEM getenv.c: free\(\)[\n]$//
index 0ca69fec4c8acb5f56f9940d729b0bc050f8fd19..35c1b121491ee7bf7b4c5686e93ae3c45bfa9972 100755 (executable)
@@ -866,7 +866,7 @@ sub checksystemfeatures {
     }
     if($feature{"TrackMemory"} && $feature{"threaded-resolver"}) {
         logmsg("*\n",
-               "*** DISABLES memory tracking when using threaded resolver\n",
+               "*** DISABLES TrackMemory (memory tracking) when using threaded resolver\n",
                "*\n");
     }