From 7f319ba82b05da329514f00e109a5689df11abf6 Mon Sep 17 00:00:00 2001 From: Naresh Kamboju Date: Mon, 12 Sep 2016 15:11:12 +0530 Subject: v2: lib: update sh-test-lib Adding two functions - report_pass - report_fail Change-Id: Ib28c8962f6ecad0b285ff54db607b61c74a056f4 Signed-off-by: Naresh Kamboju --- automated/lib/sh-test-lib | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'automated/lib') diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib index 0b81fc8..818fc90 100755 --- a/automated/lib/sh-test-lib +++ b/automated/lib/sh-test-lib @@ -60,6 +60,18 @@ check_return() { fi } +report_pass() { + [ "$#" -ne 1 ] && error_msg "Usage: report_pass test" + local test="$1" + echo "${test} pass" | tee -a "${RESULT_FILE}" +} + +report_fail() { + [ "$#" -ne 1 ] && error_msg "Usage: report_fail test" + local test="$1" + echo "${test} fail" | tee -a "${RESULT_FILE}" +} + add_metric() { if [ "$#" -ne 4 ]; then warn_msg "The number of parameters less then 4" -- cgit v1.2.3