summaryrefslogtreecommitdiff
path: root/automated
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2016-09-12 15:11:12 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2016-09-16 14:30:05 +0000
commit7f319ba82b05da329514f00e109a5689df11abf6 (patch)
tree30d5ec05fcef5cae53f770932d1cea00e01f8c01 /automated
parent092e8a72438fa372cdd76ab8bec46dbae69bfd67 (diff)
v2: lib: update sh-test-lib
Adding two functions - report_pass - report_fail Change-Id: Ib28c8962f6ecad0b285ff54db607b61c74a056f4 Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-xautomated/lib/sh-test-lib12
1 files changed, 12 insertions, 0 deletions
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"