Blame sofort/cfgtest/cfgtest.sh

32ff4c
# cfgtest.sh: sofort's config test framework,
32ff4c
# for use from within a project's custom cfgdefs.sh.
32ff4c
ece8bd
# this file is covered by COPYING.SOFORT.
ece8bd
cb3894
# in the common scenario, host-specific tests are preceded
cb3894
# by a single invocation of cfgtest_host_section, whereas
32ff4c
# native (build) system tests are preceded by the invocation
32ff4c
# of cfgtest_native_section.
32ff4c
32ff4c
# cfgdefs fraework variables:
32ff4c
# mb_cfgtest_cc:      the compiler used for the current test
32ff4c
# mb_cfgtest_cflags:  the compiler flags used for the current test
cb3894
# mb_cfgtest_cfgtype: the type of the current test (host/native)
32ff4c
# mb_cfgtest_makevar: the make variable affected by the current test
32ff4c
# mb_cfgtest_headers: headers for ad-hoc inclusion with the current test
32ff4c
32ff4c
32ff4c
cfgtest_newline()
32ff4c
{
32ff4c
	printf '\n' >> $mb_pwd/cfgdefs.mk
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_comment()
32ff4c
{
32ff4c
	mb_internal_str='#'
32ff4c
32ff4c
	for mb_internal_arg ; do
32ff4c
		mb_internal_str="$mb_internal_str $mb_internal_arg"
32ff4c
	done
32ff4c
32ff4c
	printf '%s\n' "$mb_internal_str" >> $mb_pwd/cfgdefs.mk
32ff4c
}
32ff4c
32ff4c
cb3894
cfgtest_host_section()
32ff4c
{
3ecffe
	mb_cfgtest_cc="$ccenv_host_cc"
cb3894
	mb_cfgtest_cfgtype='host'
1a4327
	mb_cfgtest_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-host)
32ff4c
cb3894
	cfgtest_comment 'host-specific tests'
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_native_section()
32ff4c
{
32ff4c
	mb_cfgtest_cc="$mb_native_cc"
32ff4c
	mb_cfgtest_cfgtype='native'
1a4327
	mb_cfgtest_cflags=$(make -s -f "$mb_pwd/Makefile.tmp" .cflags-native)
32ff4c
32ff4c
	cfgtest_comment 'native system tests'
32ff4c
}
32ff4c
32ff4c
cf05c9
cfgtest_prolog()
cf05c9
{
cf05c9
	cfgtest_line_dots='.......................'
cf05c9
	cfgtest_line_dots="${cfgtest_line_dots}${cfgtest_line_dots}"
cf05c9
	cfgtest_tool_desc=" == trying ${mb_cfgtest_cfgtype} ${1}: ${2}"
cf05c9
	cfgtest_tool_dlen="${#cfgtest_line_dots}"
cf05c9
cf05c9
	printf '\n%s\n' '________________________' >&3
cf05c9
	printf "cfgtest: probing for ${mb_cfgtest_cfgtype} ${1}: ${2}\n\n" >&3
cf05c9
	printf "%${cfgtest_tool_dlen}.${cfgtest_tool_dlen}s" \
cf05c9
		"${cfgtest_tool_desc}  ${mb_line_dots}"
cf05c9
}
cf05c9
cf05c9
cf05c9
cfgtest_epilog()
cf05c9
{
cf05c9
	cfgtest_line_dots='.......................'
53fd56
	cfgtest_tool_dlen="$((${#cfgtest_line_dots} - ${#2}))"
cf05c9
cf05c9
	printf "%${cfgtest_tool_dlen}.${cfgtest_tool_dlen}s  %s.\n" \
53fd56
		"${cfgtest_line_dots}" "${2}"
cf05c9
53fd56
	if [ "${2}" = '-----' ]; then
53fd56
		printf '\n\ncfgtest: %s is missing or cannot be found.\n' "${1}" >&3
960949
		printf '%s\n' '------------------------' >&3
960949
		return 1
1d55c8
	elif [ "${1}" = 'size-of-type' ] && [ "${2}" = '(error)' ]; then
1d55c8
		printf '\n\ncfgtest: could not determine size of type.\n' >&3
1d55c8
		printf '%s\n' '------------------------' >&3
1d55c8
		return 1
53fd56
	elif [ "${2}" = '(error)' ]; then
53fd56
		printf '\n\ncfgtest: %s is not defined or cannot be used.\n' "${1}" >&3
cf05c9
		printf '%s\n' '------------------------' >&3
cf05c9
		return 1
cf05c9
	fi
cf05c9
}
cf05c9
cf05c9
1d55c8
cfgtest_entity_size_prolog()
1d55c8
{
1d55c8
	cfgtest_line_dots='.......................'
1d55c8
	cfgtest_line_dots="${cfgtest_line_dots}${cfgtest_line_dots}"
1d55c8
	cfgtest_tool_desc=" == checking size of ${mb_cfgtest_cfgtype} type: ${@}"
1d55c8
	cfgtest_tool_dlen="${#cfgtest_line_dots}"
1d55c8
1d55c8
	printf '\n%s\n' '________________________' >&3
1d55c8
	printf "cfgtest: checking size of ${mb_cfgtest_cfgtype} type: ${@}\n\n" >&3
1d55c8
1d55c8
	printf "%${cfgtest_tool_dlen}.${cfgtest_tool_dlen}s" \
1d55c8
		"${cfgtest_tool_desc}  ${mb_line_dots}"
1d55c8
}
1d55c8
1d55c8
32ff4c
cfgtest_makevar_append()
32ff4c
{
32ff4c
	mb_internal_str='+='
32ff4c
32ff4c
	for mb_internal_arg ; do
68a078
		if ! [ -z "$mb_internal_arg" ]; then
68a078
			mb_internal_str="$mb_internal_str $mb_internal_arg"
68a078
		fi
32ff4c
	done
32ff4c
32ff4c
	printf '%-24s%s\n' "$mb_cfgtest_makevar" "$mb_internal_str" \
32ff4c
		>> $mb_pwd/cfgdefs.mk
3eaf7b
3eaf7b
	unset cfgtest_internal_unit_test
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_cflags_append()
32ff4c
{
cb3894
	if [ $mb_cfgtest_cfgtype = 'host' ]; then
32ff4c
		mb_internal_makevar='CFLAGS_CONFIG'
32ff4c
	else
7e34aa
		mb_internal_makevar='NATIVE_CFLAGS'
32ff4c
	fi
32ff4c
32ff4c
	mb_cfgtest_makevar_saved=$mb_cfgtest_makevar
32ff4c
	mb_cfgtest_makevar=$mb_internal_makevar
32ff4c
32ff4c
	cfgtest_makevar_append "$@"
32ff4c
	mb_cfgtest_makevar=$mb_cfgtest_makevar_saved
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_ldflags_append()
32ff4c
{
cb3894
	if [ $mb_cfgtest_cfgtype = 'host' ]; then
32ff4c
		mb_internal_makevar='LDFLAGS_CONFIG'
32ff4c
	else
7e34aa
		mb_internal_makevar='NATIVE_LDFLAGS'
32ff4c
	fi
32ff4c
32ff4c
	mb_cfgtest_makevar_saved=$mb_cfgtest_makevar
32ff4c
	mb_cfgtest_makevar=$mb_internal_makevar
32ff4c
32ff4c
	cfgtest_makevar_append "$@"
32ff4c
	mb_cfgtest_makevar=$mb_cfgtest_makevar_saved
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_header_presence()
32ff4c
{
cf05c9
	cfgtest_prolog 'header' "${1}"
cf05c9
cf05c9
	printf '%s -E -xc - \\\n' "$mb_cfgtest_cc"  >&3
cf05c9
cf05c9
	for cfgtest_cflag in $mb_cfgtest_cflags; do
cf05c9
		printf '\t%s \\\n' "$cfgtest_cflag" >&3
cf05c9
	done
cf05c9
cf05c9
	printf '\t%s\n\n' '--include='"${1}" >&3
cf05c9
cf05c9
	cfgtest_cmd=$(printf '%s -E -xc - %s %s'     \
cf05c9
		"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
cf05c9
		'--include='"${1}")
cf05c9
53fd56
	$(printf '%s' "$cfgtest_cmd")    \
53fd56
		< /dev/null               \
53fd56
		> /dev/null 2>&3           \
53fd56
	|| cfgtest_epilog 'header' '-----'  \
32ff4c
	|| return
32ff4c
cf05c9
	mb_internal_str=$(printf '%s%s' '-DHAVE_' "${1}"  \
c457f5
			| sed -e 's/\./_/g' -e 's@/@_@g'  \
32ff4c
			| tr "[:lower:]" "[:upper:]")
32ff4c
f1eb02
	if [ -z ${cfgtest_internal_unit_test:-} ]; then
3eaf7b
		cfgtest_cflags_append "$mb_internal_str"
3eaf7b
	else
3eaf7b
		cfgtest_makevar_append "$mb_internal_str"
3eaf7b
	fi
cf05c9
cf05c9
	printf 'cfgtest: %s header <%s> was found and may be included.\n' \
cf05c9
		"$mb_cfgtest_cfgtype" "${1}" >&3
cf05c9
	printf '%s\n' '------------------------' >&3
cf05c9
53fd56
	cfgtest_epilog 'header' "${1}"
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_header_absence()
32ff4c
{
cf05c9
	cfgtest_prolog 'header absence' "${1}"
cf05c9
cf05c9
	printf '%s -E -xc - \\\n' "$mb_cfgtest_cc"  >&3
cf05c9
cf05c9
	for cfgtest_cflag in $mb_cfgtest_cflags; do
cf05c9
		printf '\t%s \\\n' "$cfgtest_cflag" >&3
cf05c9
	done
cf05c9
cf05c9
	printf '\t%s\n\n' '--include='"${1}" >&3
cf05c9
cf05c9
	cfgtest_cmd=$(printf '%s -E -xc - %s %s'     \
cf05c9
		"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
cf05c9
		'--include='"${1}")
cf05c9
53fd56
	$(printf '%s' "$cfgtest_cmd")  \
53fd56
		< /dev/null             \
53fd56
		> /dev/null 2>&3         \
53fd56
	&& cfgtest_epilog 'header' "${1}" \
32ff4c
	&& return
32ff4c
32ff4c
	mb_internal_str=$(printf '%s%s' '-DHAVE_NO_' "$@" \
c457f5
			| sed -e 's/\./_/g' -e 's@/@_@g'  \
32ff4c
			| tr "[:lower:]" "[:upper:]")
32ff4c
f1eb02
	if [ -z ${cfgtest_internal_unit_test:-} ]; then
3eaf7b
		cfgtest_cflags_append "$mb_internal_str"
3eaf7b
	else
3eaf7b
		cfgtest_makevar_append "$mb_internal_str"
3eaf7b
	fi
cf05c9
cf05c9
	printf 'cfgtest: %s header <%s> may not be included.\n' \
cf05c9
		"$mb_cfgtest_cfgtype" "${1}" >&3
cf05c9
	printf '%s\n' '------------------------' >&3
cf05c9
53fd56
	cfgtest_epilog 'header' '-----'
32ff4c
}
32ff4c
32ff4c
32ff4c
cfgtest_interface_presence()
32ff4c
{
960949
	cfgtest_prolog 'interface' "${1}"
960949
960949
	mb_internal_cflags=
32ff4c
32ff4c
	for mb_header in $mb_cfgtest_headers; do
32ff4c
		mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
32ff4c
	done
32ff4c
960949
	cfgtest_code_snippet=$(printf 'void * addr = &%;;' "${1}")
960949
960949
	printf 'printf %s "%s" \\\n' "'%s'" "$cfgtest_code_snippet" >&3
960949
	printf '| %s -S -xc - -o -' "$mb_cfgtest_cc"  >&3
960949
960949
	for cfgtest_cflag in $mb_cfgtest_cflags; do
960949
		printf ' \\\n\t%s' "$cfgtest_cflag" >&3
960949
	done
960949
960949
	for cfgtest_cflag in $mb_internal_cflags; do
960949
		printf ' \\\n\t%s' "$cfgtest_cflag" >&3
960949
	done
960949
960949
	printf '\n\n' >&3
960949
960949
	cfgtest_cmd=$(printf '%s -S -xc - -o - %s %s'  \
960949
		"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
960949
		"$mb_internal_cflags")
960949
960949
	printf '%s' "$cfgtest_code_snippet"     \
960949
		| $(printf '%s' "$cfgtest_cmd") \
960949
                > /dev/null 2>&3                \
53fd56
       || cfgtest_epilog 'interface' '(error)'  \
960949
       || return
32ff4c
502550
	mb_internal_str=$(printf '%s%s' '-DHAVE_' "$@"  \
502550
			| sed -e 's/\./_/g'             \
502550
			| tr "[:lower:]" "[:upper:]")
502550
f1eb02
	if [ -z ${cfgtest_internal_unit_test:-} ]; then
3eaf7b
		cfgtest_cflags_append "$mb_internal_str"
3eaf7b
	else
3eaf7b
		cfgtest_makevar_append "$mb_internal_str"
3eaf7b
	fi
502550
960949
	printf 'cfgtest: %s interface `%s'"'"' is available.\n' \
960949
		"$mb_cfgtest_cfgtype" "${1}" >&3
960949
	printf '%s\n' '------------------------' >&3
960949
53fd56
	cfgtest_epilog 'interface' "${1}"
960949
32ff4c
	return 0
32ff4c
}
32ff4c
73a6fd
73a6fd
cfgtest_decl_presence()
73a6fd
{
53fd56
	cfgtest_prolog 'decl' "${1}"
53fd56
53fd56
	mb_internal_cflags=
73a6fd
73a6fd
	for mb_header in $mb_cfgtest_headers; do
73a6fd
		mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
73a6fd
	done
73a6fd
53fd56
	cfgtest_code_snippet=$(printf 'void * any = (void *)(%s);' "${1}")
53fd56
53fd56
	printf 'printf %s "%s" \\\n' "'%s'" "$cfgtest_code_snippet" >&3
53fd56
	printf '| %s -S -xc - -o -' "$mb_cfgtest_cc"  >&3
53fd56
53fd56
	for cfgtest_cflag in $mb_cfgtest_cflags; do
53fd56
		printf ' \\\n\t%s' "$cfgtest_cflag" >&3
53fd56
	done
53fd56
53fd56
	for cfgtest_cflag in $mb_internal_cflags; do
53fd56
		printf ' \\\n\t%s' "$cfgtest_cflag" >&3
53fd56
	done
53fd56
53fd56
	printf '\n\n' >&3
53fd56
53fd56
	cfgtest_cmd=$(printf '%s -S -xc - -o - %s %s' \
53fd56
		"$mb_cfgtest_cc" "$mb_cfgtest_cflags" \
53fd56
		"$mb_internal_cflags")
53fd56
53fd56
	printf '%s' "$cfgtest_code_snippet"     \
53fd56
		| $(printf '%s' "$cfgtest_cmd") \
53fd56
                > /dev/null 2>&3                \
53fd56
       || cfgtest_epilog 'decl' '(error)'     \
53fd56
       || return
73a6fd
73a6fd
	# does the argument solely consist of the macro or enum member name?
73a6fd
	mb_internal_str=$(printf '%s' "$@" | tr -d '[a-z][A-Z][0-9][_]')
73a6fd
73a6fd
	if [ -n "$mb_internal_str" ]; then
53fd56
		cfgtest_epilog 'decl' '(defined)'
73a6fd
		return 0
73a6fd
	fi
73a6fd
73a6fd
	mb_internal_str=$(printf '%s%s' '-DHAVE_DECL_' "$@"  \
73a6fd
			| sed -e 's/\./_/g'                  \
73a6fd
			| tr "[:lower:]" "[:upper:]")
73a6fd
f1eb02
	if [ -z ${cfgtest_internal_unit_test:-} ]; then
3eaf7b
		cfgtest_cflags_append "$mb_internal_str"
3eaf7b
	else
3eaf7b
		cfgtest_makevar_append "$mb_internal_str"
3eaf7b
	fi
73a6fd
53fd56
	printf 'cfgtest: `%s'"'"' is defined for the %s system.\n' \
53fd56
		"${1}" "$mb_cfgtest_cfgtype" >&3
53fd56
	printf '%s\n' '------------------------' >&3
53fd56
53fd56
	cfgtest_epilog 'decl' '(defined)'
53fd56
73a6fd
	return 0
73a6fd
}
73a6fd
73a6fd
e0398c
cfgtest_type_size()
e0398c
{
1d55c8
	cfgtest_entity_size_prolog "$@"
1d55c8
e0398c
	mb_internal_cflags=''
e0398c
	mb_internal_size=''
e0398c
	mb_internal_test='char x[(sizeof(%s) == %s) ? 1 : -1];'
e0398c
e0398c
	for mb_header in $mb_cfgtest_headers; do
e0398c
		mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
e0398c
	done
e0398c
e0398c
	for mb_internal_guess in 8 4 2 1 16 32 64 128; do
e0398c
		if [ -z $mb_internal_size ]; then
e0398c
			mb_internal_type="$@"
e0398c
e0398c
			mb_internal_str=$(printf "$mb_internal_test"    \
e0398c
				"$mb_internal_type"                     \
e0398c
				"$mb_internal_guess")
e0398c
e0398c
			printf '%s' "$mb_internal_str"                  \
e0398c
					| $mb_cfgtest_cc -S -xc - -o -  \
e0398c
					  $mb_cfgtest_cflags            \
e0398c
					  $mb_internal_cflags           \
e0398c
				> /dev/null 2>/dev/null                 \
e0398c
			&& mb_internal_size=$mb_internal_guess
e0398c
		fi
e0398c
	done
e0398c
e0398c
	# unrecognized type, or type size not within range
e0398c
	if [ -z $mb_internal_size ]; then
1d55c8
		cfgtest_epilog 'size-of-type' '(error)'
e0398c
		return 1
e0398c
	fi
e0398c
e0398c
	# -DSIZEOF_TYPE=SIZE
e0398c
	mb_internal_str=$(printf '%s%s=%s' '-DSIZEOF_'        \
e0398c
				"$mb_internal_type"           \
e0398c
				"$mb_internal_size"           \
e0398c
			| sed -e 's/\ /_/g' -e 's/*/P/g'      \
e0398c
			| tr "[:lower:]" "[:upper:]")
e0398c
e0398c
	if [ -z ${cfgtest_internal_unit_test:-} ]; then
e0398c
		cfgtest_cflags_append "$mb_internal_str"
e0398c
	else
e0398c
		cfgtest_makevar_append "$mb_internal_str"
e0398c
	fi
e0398c
1d55c8
	printf 'cfgtest: size of type `%s'"'"' determined to be %s\n' \
1d55c8
		"${@}" "$mb_internal_size" >&3
1d55c8
	printf '%s\n' '------------------------' >&3
1d55c8
1d55c8
	cfgtest_epilog 'size-of-type' "$mb_internal_size"
1d55c8
e0398c
	return 0
e0398c
}
e0398c
e0398c
f66c30
cfgtest_code_snippet()
f66c30
{
f66c30
	mb_internal_cflags=''
f66c30
	mb_internal_test="$@"
f66c30
f66c30
	for mb_header in $mb_cfgtest_headers; do
f66c30
		mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
f66c30
	done
f66c30
f66c30
	printf '%s' "$mb_internal_test"                 \
f66c30
			| $mb_cfgtest_cc -S -xc - -o -  \
f66c30
			  $mb_cfgtest_cflags            \
f66c30
			  $mb_internal_cflags           \
f66c30
		> /dev/null 2>/dev/null                 \
f66c30
	|| return 1
f66c30
f66c30
	return 0
f66c30
}
f66c30
f66c30
98b935
cfgtest_code_snippet_asm()
98b935
{
98b935
	mb_internal_cflags=''
98b935
	mb_internal_test="$@"
98b935
98b935
	cfgtest_tmp=$(mktemp ./tmp_XXXXXXXXXXXXXXXX)
98b935
	cfgtest_ret=1
98b935
98b935
	for mb_header in $mb_cfgtest_headers; do
98b935
		mb_internal_cflags="$mb_internal_cflags --include=$mb_header"
98b935
	done
98b935
98b935
	printf '%s' "$mb_internal_test"                 \
98b935
			| $mb_cfgtest_cc -c -xc -       \
98b935
			  -o $cfgtest_tmp               \
98b935
			  $mb_cfgtest_cflags            \
98b935
			  $mb_internal_cflags           \
98b935
		> /dev/null 2>/dev/null                 \
98b935
	&& cfgtest_ret=0
98b935
98b935
	rm -f "$cfgtest_tmp"
98b935
	unset cfgtest_tmp
98b935
98b935
	return $cfgtest_ret
98b935
}
98b935
98b935
32ff4c
cfgtest_library_presence()
32ff4c
{
79612e
	cfgtest_libs=
79612e
	cfgtest_spc=
79612e
79612e
	for cfgtest_lib in ${@}; do
79612e
		cfgtest_libs="$cfgtest_libs$cfgtest_spc$cfgtest_lib"
79612e
		cfgtest_spc=' '
79612e
	done
79612e
79612e
	if [ "${1}" = "$cfgtest_libs" ]; then
79612e
		cfgtest_prolog 'library' "${1#*-l}"
79612e
	else
79612e
		cfgtest_prolog 'lib module' '(see config.log)'
79612e
	fi
79612e
79612e
	cfgtest_code_snippet='int main(void){return 0;}'
79612e
79612e
	printf 'printf %s "%s" \\\n' "'%s'" "$cfgtest_code_snippet" >&3
79612e
	printf '| %s -o a.out -xc -' "$mb_cfgtest_cc"  >&3
79612e
79612e
	for cfgtest_cflag in $mb_cfgtest_cflags; do
79612e
		printf ' \\\n\t%s' "$cfgtest_cflag" >&3
79612e
	done
79612e
79612e
	for cfgtest_lib in ${@}; do
79612e
		printf ' \\\n\t%s' "$cfgtest_lib" >&3
79612e
	done
79612e
79612e
	printf '\n\n' >&3
79612e
79612e
	cfgtest_cmd=$(printf '%s -o a.out -xc - %s' \
79612e
		"$mb_cfgtest_cc" "$mb_cfgtest_cflags")
79612e
79612e
	cfgtest_cmd="$cfgtest_cmd $cfgtest_libs"
79612e
79612e
	printf '%s' "$cfgtest_code_snippet"          \
79612e
		| $(printf '%s' "$cfgtest_cmd")      \
79612e
		> /dev/null 2>&3                     \
79612e
	|| cfgtest_epilog 'library' '-----'          \
32ff4c
	|| return 1
32ff4c
32ff4c
	rm -f a.out
32ff4c
79612e
	printf 'cfgtest: `%s'"'"' was accepted by the linker driver.\n' \
79612e
		"$cfgtest_libs" >&3
79612e
	printf '%s\n' '------------------------' >&3
79612e
79612e
	cfgtest_epilog 'library' '(present)'
79612e
32ff4c
	return 0
32ff4c
}
3eaf7b
3eaf7b
3eaf7b
cfgtest_unit_header_presence()
3eaf7b
{
3eaf7b
	cfgtest_internal_unit_test='unit_test'
3eaf7b
	cfgtest_header_presence "$@" || return 1
3eaf7b
	return 0
3eaf7b
}
3eaf7b
3eaf7b
3eaf7b
cfgtest_unit_header_absence()
3eaf7b
{
3eaf7b
	cfgtest_internal_unit_test='unit_test'
3eaf7b
	cfgtest_header_absence "$@" || return 1
3eaf7b
	return 0
3eaf7b
}
3eaf7b
3eaf7b
3eaf7b
cfgtest_unit_interface_presence()
3eaf7b
{
3eaf7b
	cfgtest_internal_unit_test='unit_test'
3eaf7b
	cfgtest_interface_presence "$@" || return 1
3eaf7b
	return 0
3eaf7b
}
3eaf7b
3eaf7b
3eaf7b
cfgtest_unit_decl_presence()
3eaf7b
{
3eaf7b
	cfgtest_internal_unit_test='unit_test'
3eaf7b
	cfgtest_decl_presence "$@" || return 1
3eaf7b
	return 0
3eaf7b
}
e0398c
e0398c
e0398c
cfgtest_unit_type_size()
e0398c
{
e0398c
	cfgtest_internal_unit_test='unit_test'
e0398c
	cfgtest_type_size "$@" || return 1
e0398c
	return 0
e0398c
}