Replace configs_enabled check with query_compile_time_config

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2021-12-06 16:52:57 +08:00 committed by Gilles Peskine
parent 4f2dff429a
commit bbfa1d8c19

View File

@ -45,6 +45,7 @@ fi
: ${P_SRV:=../programs/ssl/ssl_server2}
: ${P_CLI:=../programs/ssl/ssl_client2}
: ${P_PXY:=../programs/test/udp_proxy}
: ${P_QUERY:=../programs/test/query_compile_time_config}
: ${OPENSSL_CMD:=openssl} # OPENSSL would conflict with the build system
: ${GNUTLS_CLI:=gnutls-cli}
: ${GNUTLS_SERV:=gnutls-serv}
@ -190,10 +191,7 @@ esac
# testing. Skip non-boolean options (with something other than spaces
# and a comment after "#define SYMBOL"). The variable contains a
# space-separated list of symbols.
CONFIGS_ENABLED=" $(<"$CONFIG_H" \
sed -n 's!^ *#define *\([A-Za-z][0-9A-Z_a-z]*\) *\(/*\)*!\1!p' |
tr '\n' ' ')"
CONFIGS_ENABLED="$($P_QUERY -l)"
# Skip next test; use this macro to skip tests which are legitimate
# in theory and expected to be re-introduced at some point, but
# aren't expected to succeed at the moment due to problems outside
@ -206,6 +204,7 @@ skip_next_test() {
requires_config_enabled() {
case $CONFIGS_ENABLED in
*" $1 "*) :;;
*" $1="*) :;;
*) SKIP_NEXT="YES";;
esac
}
@ -214,6 +213,7 @@ requires_config_enabled() {
requires_config_disabled() {
case $CONFIGS_ENABLED in
*" $1 "*) SKIP_NEXT="YES";;
*" $1="*) SKIP_NEXT="YES";;
esac
}