Add trivial record_outcome function to facilitate backports
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 4f010ca..a2410b7 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -439,9 +439,14 @@
}
+# Trivial function for compatibility with later Mbed TLS versions
+record_outcome() {
+ echo "$1"
+}
+
# fail <message>
fail() {
- echo "FAIL"
+ record_outcome "FAIL" "$1"
echo " ! $1"
mv $SRV_OUT o-srv-${TESTS}.log
@@ -657,7 +662,7 @@
# should we skip?
if [ "X$SKIP_NEXT" = "XYES" ]; then
SKIP_NEXT="NO"
- echo "SKIP"
+ record_outcome "SKIP"
SKIPS=$(( $SKIPS + 1 ))
return
fi
@@ -856,7 +861,7 @@
fi
# if we're here, everything is ok
- echo "PASS"
+ record_outcome "PASS"
if [ "$PRESERVE_LOGS" -gt 0 ]; then
mv $SRV_OUT o-srv-${TESTS}.log
mv $CLI_OUT o-cli-${TESTS}.log