summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sofort/cfgtest.sh58
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
+}