mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:53:32 +03:00
buildinfo: move from tests/server/ to src/, rename to curlinfo
Since a16485a42e, the test servers build with a different set of
options than the tool/lib - for example a different CURLDEBUG. To make
buildinfo better reflect the curl build, move it to src/ and build it
here using the local CURLDEBUG. Renamed to curlinfo to not get confused
with buildinfo.txt
I chose src/ and not lib/ because the file also uses tool-specific headers.
Assisted-by: Viktor Szakats
Closes #17187
This commit is contained in:
parent
4a70b9823b
commit
7a1211d474
8 changed files with 30 additions and 9 deletions
|
|
@ -30,6 +30,10 @@ mark_as_advanced(TEST_NGHTTPX)
|
|||
configure_file("config.in" "${CMAKE_CURRENT_BINARY_DIR}/config" @ONLY)
|
||||
|
||||
add_custom_target(testdeps)
|
||||
if(BUILD_CURL_EXE)
|
||||
add_dependencies(testdeps curlinfo)
|
||||
endif()
|
||||
|
||||
add_subdirectory(http)
|
||||
add_subdirectory(http/clients)
|
||||
add_subdirectory(server)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ BEGIN {
|
|||
$anyway
|
||||
$automakestyle
|
||||
$CURL
|
||||
$CURLINFO
|
||||
$CURLVERSION
|
||||
$CURLVERNUM
|
||||
$DATE
|
||||
|
|
@ -114,7 +115,11 @@ our $UNITDIR=dirsepadd("./unit/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
|||
our $TUNITDIR=dirsepadd("./tunit/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
||||
our $SRVDIR=dirsepadd("./server/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
||||
our $TESTDIR="$srcdir/data";
|
||||
our $CURL=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) . "curl".exe_ext('TOOL'); # what curl binary to run on the tests
|
||||
our $CURL=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) .
|
||||
"curl".exe_ext('TOOL'); # what curl binary to run on the tests
|
||||
our $CURLINFO=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) .
|
||||
"curlinfo".exe_ext('TOOL'); # what curlinfo binary to run on the tests
|
||||
|
||||
our $VCURL=$CURL; # what curl binary to use to verify the servers with
|
||||
# VCURL is handy to set to the system one when the one you
|
||||
# just built hangs or crashes and thus prevent verification
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ sub checksystemfeatures {
|
|||
@version = <$versout>;
|
||||
close($versout);
|
||||
|
||||
open(my $disabledh, "-|", server_exe('buildinfo', 'TOOL'));
|
||||
open(my $disabledh, "-|", exerunner() . shell_quote($CURLINFO));
|
||||
while(<$disabledh>) {
|
||||
if($_ =~ /([^:]*): ([ONF]*)/) {
|
||||
my ($val, $toggle) = ($1, $2);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
###########################################################################
|
||||
|
||||
SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd buildinfo mqttd dnsd
|
||||
SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd mqttd dnsd
|
||||
|
||||
MEMDEBUG = \
|
||||
../../lib/memdebug.c \
|
||||
|
|
@ -122,5 +122,3 @@ dnsd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
|
|||
dnsd.c
|
||||
dnsd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
|
||||
dnsd_CFLAGS = $(AM_CFLAGS)
|
||||
|
||||
buildinfo_SOURCES = buildinfo.c
|
||||
|
|
|
|||
|
|
@ -1,244 +0,0 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* SPDX-License-Identifier: curl
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* The purpose of this tool is to figure out which, if any, features that are
|
||||
* disabled which should otherwise exist and work. These aren't visible in
|
||||
* regular curl -V output.
|
||||
*
|
||||
* Disabled protocols are visible in curl_version_info() and are not included
|
||||
* in this table.
|
||||
*/
|
||||
|
||||
#include "curl_setup.h"
|
||||
#include "multihandle.h" /* for ENABLE_WAKEUP */
|
||||
#include "tool_xattr.h" /* for USE_XATTR */
|
||||
#include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */
|
||||
#include <stdio.h>
|
||||
|
||||
static const char *disabled[]={
|
||||
"bindlocal: "
|
||||
#ifdef CURL_DISABLE_BINDLOCAL
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
|
||||
"cookies: "
|
||||
#ifdef CURL_DISABLE_COOKIES
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
|
||||
"basic-auth: "
|
||||
#ifdef CURL_DISABLE_BASIC_AUTH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"bearer-auth: "
|
||||
#ifdef CURL_DISABLE_BEARER_AUTH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"digest-auth: "
|
||||
#ifdef CURL_DISABLE_DIGEST_AUTH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"negotiate-auth: "
|
||||
#ifdef CURL_DISABLE_NEGOTIATE_AUTH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"aws: "
|
||||
#ifdef CURL_DISABLE_AWS
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"DoH: "
|
||||
#ifdef CURL_DISABLE_DOH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"HTTP-auth: "
|
||||
#ifdef CURL_DISABLE_HTTP_AUTH
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"Mime: "
|
||||
#ifdef CURL_DISABLE_MIME
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
|
||||
"netrc: "
|
||||
#ifdef CURL_DISABLE_NETRC
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"parsedate: "
|
||||
#ifdef CURL_DISABLE_PARSEDATE
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"proxy: "
|
||||
#ifdef CURL_DISABLE_PROXY
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"shuffle-dns: "
|
||||
#ifdef CURL_DISABLE_SHUFFLE_DNS
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"typecheck: "
|
||||
#ifdef CURL_DISABLE_TYPECHECK
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"verbose-strings: "
|
||||
#ifdef CURL_DISABLE_VERBOSE_STRINGS
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"wakeup: "
|
||||
#ifndef ENABLE_WAKEUP
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"headers-api: "
|
||||
#ifdef CURL_DISABLE_HEADERS_API
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"xattr: "
|
||||
#ifndef USE_XATTR
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"form-api: "
|
||||
#ifdef CURL_DISABLE_FORM_API
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"large-time: "
|
||||
#if (SIZEOF_TIME_T < 5)
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"large-size: "
|
||||
#if (SIZEOF_SIZE_T < 5)
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"sha512-256: "
|
||||
#ifndef CURL_HAVE_SHA512_256
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
|
||||
"win32-ca-searchpath: "
|
||||
#if !defined(_WIN32) || \
|
||||
(defined(CURL_WINDOWS_UWP) || \
|
||||
defined(CURL_DISABLE_CA_SEARCH) || defined(CURL_CA_SEARCH_SAFE))
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"win32-ca-search-safe: "
|
||||
#if !defined(_WIN32) || !defined(CURL_CA_SEARCH_SAFE)
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
|
||||
"--libcurl: "
|
||||
#ifdef CURL_DISABLE_LIBCURL_OPTION
|
||||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
NULL
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
for(i = 0; disabled[i]; i++)
|
||||
printf("%s\n", disabled[i]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -87,13 +87,18 @@ sub scan_cmake_config_h {
|
|||
scanconf_cmake(\%disable_cmake_config_h, "$root/lib/curl_config.h.cmake");
|
||||
}
|
||||
|
||||
my %whitelisted = ("CURL_DISABLE_TYPECHECK" => 1);
|
||||
|
||||
sub scan_file {
|
||||
my ($source)=@_;
|
||||
open F, "<$source";
|
||||
while(<F>) {
|
||||
while(s/(CURL_DISABLE_[A-Z0-9_]+)//) {
|
||||
my ($sym)=($1);
|
||||
$file{$sym} = $source;
|
||||
|
||||
if(!$whitelisted{$sym}) {
|
||||
$file{$sym} = $source;
|
||||
}
|
||||
}
|
||||
}
|
||||
close F;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue