diff options
author | midipix <writeonce@midipix.org> | 2018-12-19 18:24:16 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-19 22:12:13 -0500 |
commit | 69ae9e6ecc37fa55449046ceb7fba2eecf21a30b (patch) | |
tree | 785703317576870254f6dcf26774eeb76764b2e4 /sofort | |
parent | 2cf4337bc32b7baad49649232b1c01215adeb5ba (diff) | |
download | sbpython3-69ae9e6ecc37fa55449046ceb7fba2eecf21a30b.tar.bz2 sbpython3-69ae9e6ecc37fa55449046ceb7fba2eecf21a30b.tar.xz |
build system: config-time test framework: added unit-specific test variants.
Diffstat (limited to 'sofort')
-rw-r--r-- | sofort/cfgtest.sh | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/sofort/cfgtest.sh b/sofort/cfgtest.sh index 57aca7c..b4e5686 100644 --- a/sofort/cfgtest.sh +++ b/sofort/cfgtest.sh @@ -64,6 +64,8 @@ cfgtest_makevar_append() printf '%-24s%s\n' "$mb_cfgtest_makevar" "$mb_internal_str" \ >> $mb_pwd/cfgdefs.mk + + unset cfgtest_internal_unit_test } @@ -112,7 +114,11 @@ cfgtest_header_presence() | sed -e 's/\./_/g' -e 's@/@_@g' \ | tr "[:lower:]" "[:upper:]") - cfgtest_cflags_append "$mb_internal_str" + if [ -z $cfgtest_internal_unit_test ]; then + cfgtest_cflags_append "$mb_internal_str" + else + cfgtest_makevar_append "$mb_internal_str" + fi } @@ -129,7 +135,11 @@ cfgtest_header_absence() | sed -e 's/\./_/g' -e 's@/@_@g' \ | tr "[:lower:]" "[:upper:]") - cfgtest_cflags_append "$mb_internal_str" + if [ -z $cfgtest_internal_unit_test ]; then + cfgtest_cflags_append "$mb_internal_str" + else + cfgtest_makevar_append "$mb_internal_str" + fi } @@ -152,7 +162,11 @@ cfgtest_interface_presence() | sed -e 's/\./_/g' \ | tr "[:lower:]" "[:upper:]") - cfgtest_cflags_append "$mb_internal_str" + if [ -z $cfgtest_internal_unit_test ]; then + cfgtest_cflags_append "$mb_internal_str" + else + cfgtest_makevar_append "$mb_internal_str" + fi return 0 } @@ -184,7 +198,11 @@ cfgtest_decl_presence() | sed -e 's/\./_/g' \ | tr "[:lower:]" "[:upper:]") - cfgtest_cflags_append "$mb_internal_str" + if [ -z $cfgtest_internal_unit_test ]; then + cfgtest_cflags_append "$mb_internal_str" + else + cfgtest_makevar_append "$mb_internal_str" + fi return 0 } @@ -203,3 +221,35 @@ cfgtest_library_presence() return 0 } + + +cfgtest_unit_header_presence() +{ + cfgtest_internal_unit_test='unit_test' + cfgtest_header_presence "$@" || return 1 + return 0 +} + + +cfgtest_unit_header_absence() +{ + cfgtest_internal_unit_test='unit_test' + cfgtest_header_absence "$@" || return 1 + return 0 +} + + +cfgtest_unit_interface_presence() +{ + cfgtest_internal_unit_test='unit_test' + cfgtest_interface_presence "$@" || return 1 + return 0 +} + + +cfgtest_unit_decl_presence() +{ + cfgtest_internal_unit_test='unit_test' + cfgtest_decl_presence "$@" || return 1 + return 0 +} |