diff options
author | midipix <writeonce@midipix.org> | 2018-12-19 18:24:16 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-24 19:22:38 -0500 |
commit | 08802892a1be1879c6bd437a2adc7504514b7ec1 (patch) | |
tree | 4102f408517c7e1c6f6cf3a1e6ee2d16cef7c4c4 | |
parent | 2e11710931ed56d226ca154f9da73c347d9f7cdc (diff) | |
download | sofort-08802892a1be1879c6bd437a2adc7504514b7ec1.tar.bz2 sofort-08802892a1be1879c6bd437a2adc7504514b7ec1.tar.xz |
cfgtest.sh: added unit-specific test variants.
-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 +} |