summaryrefslogtreecommitdiff
path: root/automated/lib/sh-test-lib
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2016-08-17 17:11:30 +0530
committerNaresh Kamboju <naresh.kamboju@linaro.org>2016-09-06 13:38:30 +0530
commit700e4f543c2cbebad14ba8c31169f2f8f5488088 (patch)
treea5812fbd1944b49b5d9a949bf978801eb16c0b1d /automated/lib/sh-test-lib
parentfaf7d2820ef33bb47d81ec9bccd19353188bfdb5 (diff)
ui-browser-test: Adding UI browser testing
Ui browser test developed on top of Robot frame work. Test runs chromium, chrome and firefox test cases. On LAVA we have access to serial console and we have to run ui tests from this serial console, this is possible by changing user from root to linaro and exporting the DISPLAY=:0. because linaro owns the X display process. Change-Id: I43bda407f468120839b0a4c8248777303945529e Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Diffstat (limited to 'automated/lib/sh-test-lib')
-rwxr-xr-xautomated/lib/sh-test-lib19
1 files changed, 19 insertions, 0 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index fca1153..3edecb8 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -114,3 +114,22 @@ install_deps() {
esac
fi
}
+
+validate_check_sum() {
+ if [ "$#" -ne 2 ]; then
+ warn_msg "The number of parameters should be 2"
+ error_msg "Usage: validate_check_sum filename known_sha256sum"
+ return 1
+ fi
+ OUTPUT_FILE_NAME="$1"
+ SHA256SUM_CHECK="$2"
+ # Get sha256sum of output_file
+ GET_SHA256SUM=$(sha256sum ${OUTPUT_FILE_NAME} | awk '{print $1}')
+ echo "GET_SHA256SUM is "${GET_SHA256SUM}""
+ if [ "${SHA256SUM_CHECK}" = "${GET_SHA256SUM}" ] ; then
+ return 0
+ else
+ echo "checksum did not match"
+ return 1
+ fi
+}