diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-11-05 15:10:51 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-11-05 16:58:45 +0530 |
commit | 17e3fe8b81f2793d1279b81f99d464cc2d1a4ccc (patch) | |
tree | 0cc37a8d9be196e2a41e1260858d51cc9695e9f4 | |
parent | 622880b87dda44b329d2bc413ec9345ecc19fd2b (diff) |
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | automated/linux/openssh/openssh-debian.sh | 33 | ||||
-rw-r--r-- | automated/linux/openssh/openssh-debian.yaml | 28 |
2 files changed, 61 insertions, 0 deletions
diff --git a/automated/linux/openssh/openssh-debian.sh b/automated/linux/openssh/openssh-debian.sh new file mode 100755 index 0000000..46a9bc4 --- /dev/null +++ b/automated/linux/openssh/openssh-debian.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +. ../../lib/sh-test-lib +OUTPUT="$(pwd)/output" +RESULT_FILE="${OUTPUT}/result.txt" +RESULT_LOG="${OUTPUT}/result_log.txt" +TEST_LOG="${OUTPUT}/test_log.txt" + +parse_output() { +egrep "^failed|^ok" "${TEST_LOG}" 2>&1 | tee -a "${RESULT_LOG}" +sed -i -e 's/ok/pass/g' "${RESULT_LOG}" +sed -i -e 's/failed/fail/g' "${RESULT_LOG}" +awk '{for (i=2; i<NF; i++) printf $i "-"; print $NF " " $1}' "${RESULT_LOG}" 2>&1 | tee -a "${RESULT_FILE}" +} + +# Test run. +! check_root && error_msg "This script must be run as root" +[ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)" +mkdir -p "${OUTPUT}" + +info_msg "About to run dd test..." +info_msg "Output directory: ${OUTPUT}" + +apt-get update +apt-get source openssh +cd openssh-* +./configure +make +sudo make install +# make sure you are running tests as user (NOT root user) +make tests 2>&1 | tee -a "${TEST_LOG}" + +parse_output diff --git a/automated/linux/openssh/openssh-debian.yaml b/automated/linux/openssh/openssh-debian.yaml new file mode 100644 index 0000000..9f7c384 --- /dev/null +++ b/automated/linux/openssh/openssh-debian.yaml @@ -0,0 +1,28 @@ +metadata: + name: openssh-debian + format: "Manual Test Definition 1.0" + description: "Normal OpenSSH development produces a very small, secure, + and easy to maintain version for the OpenBSD project. + The OpenSSH Portability Team takes that pure version and adds + portability code so that OpenSSH can run on many other operating systems + More details in wiki: http://www.openssh.com/portable.html" + maintainer: + - naresh.kamboju@linaro.org + os: + - debian + - ubuntu + scope: + - functional + devices: + - d02 + - d03 + - d05 + - overdrive + environment: + - lava-test-shell + +run: + steps: + - cd ./automated/linux/openssh + - ./openssh-debian.sh + - ../../utils/send-to-lava.sh ./output/result.txt |