Add requires_{any,all}_configs_enabled functions
- requires_any_configs_enabled
- requires_all_configs_enabled
- requires_any_configs_disabled
- requires_all_configs_disabled
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 398ce57..ec243ad 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -223,6 +223,34 @@
esac
}
+requires_all_configs_enabled() {
+ if ! $P_QUERY -all $*
+ then
+ SKIP_NEXT="YES"
+ fi
+}
+
+requires_all_configs_disabled() {
+ if $P_QUERY -any $*
+ then
+ SKIP_NEXT="YES"
+ fi
+}
+
+requires_any_configs_enabled() {
+ if ! $P_QUERY -any $*
+ then
+ SKIP_NEXT="YES"
+ fi
+}
+
+requires_any_configs_disabled() {
+ if $P_QUERY -all $*
+ then
+ SKIP_NEXT="YES"
+ fi
+}
+
get_config_value_or_default() {
# This function uses the query_config command line option to query the
# required Mbed TLS compile time configuration from the ssl_server2