src: drop support for CURL_TESTDIR debug env

No longer used by curl tests.

`--output-dir` option can be used as an alternative in all builds.

Follow-up to 39697dead3 #15114
Closes #15893
This commit is contained in:
Viktor Szakats 2025-01-01 23:14:13 +01:00
parent 772b6933bc
commit 41e5a116a1
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
2 changed files with 0 additions and 37 deletions

View File

@ -392,26 +392,6 @@ static char *parse_filename(const char *ptr, size_t len)
}
#endif /* _WIN32 || MSDOS */
/* in case we built debug enabled, we allow an environment variable
* named CURL_TESTDIR to prefix the given filename to put it into a
* specific directory
*/
#ifdef DEBUGBUILD
{
char *tdir = curl_getenv("CURL_TESTDIR");
if(tdir) {
char buffer[512]; /* suitably large */
msnprintf(buffer, sizeof(buffer), "%s/%s", tdir, copy);
Curl_safefree(copy);
copy = strdup(buffer); /* clone the buffer, we do not use the libcurl
aprintf() or similar since we want to use the
same memory code as the "real" parse_filename
function */
curl_free(tdir);
}
}
#endif
return copy;
}

View File

@ -238,23 +238,6 @@ CURLcode get_url_file_name(struct GlobalConfig *global,
}
#endif /* _WIN32 || MSDOS */
/* in case we built debug enabled, we allow an environment variable
* named CURL_TESTDIR to prefix the given filename to put it into a
* specific directory
*/
#ifdef DEBUGBUILD
{
char *tdir = curl_getenv("CURL_TESTDIR");
if(tdir) {
char *alt = aprintf("%s/%s", tdir, *filename);
Curl_safefree(*filename);
*filename = alt;
curl_free(tdir);
if(!*filename)
return CURLE_OUT_OF_MEMORY;
}
}
#endif
return CURLE_OK;
}
}