diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-07-21 10:49:18 +0200 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-11-02 17:17:37 +0100 |
commit | 0efd89bf3b242f2149ca2aa60f373f4c05d89dec (patch) | |
tree | 37fbe75b995399f53346b18701059aaa50912b06 /tct | |
parent | e73fa78f475cc6d3f938ac043a1781bbf1013106 (diff) | |
download | major-0efd89bf3b242f2149ca2aa60f373f4c05d89dec.tar.gz major-0efd89bf3b242f2149ca2aa60f373f4c05d89dec.tar.bz2 major-0efd89bf3b242f2149ca2aa60f373f4c05d89dec.zip |
Dump variable name and value to sysctl.result file
tct/run/smoke_tests.sh produces some numerical output. This patch makes
it easy to store and retreive values as in line below:
awk -v KEY="${KEY}" '$1 == KEY {print $2}' $DICT
where $KEY is variable name and $DICT is sysctl.result file.
Change-Id: I3eee61152a189ad443fa641f5160f516567506f1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tct')
-rwxr-xr-x | tct/minnow_prepare_flash_conf.sh | 4 | ||||
-rwxr-xr-x | tct/odroid_prepare_flash_conf.sh | 3 | ||||
-rwxr-xr-x | tct/run/smoke_tests.sh | 12 |
3 files changed, 16 insertions, 3 deletions
diff --git a/tct/minnow_prepare_flash_conf.sh b/tct/minnow_prepare_flash_conf.sh index c839c90..80e1d95 100755 --- a/tct/minnow_prepare_flash_conf.sh +++ b/tct/minnow_prepare_flash_conf.sh @@ -66,6 +66,7 @@ restart_device "${SDMUX}" echo "### conf ###" +CONNECT_CNT=0 SLEEP=30 while [ -z "`ping -c 1 ${IP} -W 1 | grep icmp_seq`" ] @@ -82,6 +83,7 @@ do fi sleep "${SLEEP}" SLEEP=$((SLEEP+20)) + CONNECT_CNT=$((CONNECT_CNT+1)) done printf "\n" @@ -96,6 +98,7 @@ do die "Timeout: ssh port not open!" fi SLEEP=$((SLEEP+10)) + CONNECT_CNT=$((CONNECT_CNT+1)) done printf "\n" @@ -107,6 +110,7 @@ SLEEP=10 copy_ssh "${IP}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" run_smoke_ssh "${IP}" +echo "CONNECT_CNT $CONNECT_CNT" >> sysctl.result cat sysctl.result echo "### cleanup ###" diff --git a/tct/odroid_prepare_flash_conf.sh b/tct/odroid_prepare_flash_conf.sh index 4995a6b..2e5992b 100755 --- a/tct/odroid_prepare_flash_conf.sh +++ b/tct/odroid_prepare_flash_conf.sh @@ -71,6 +71,7 @@ restart_device "${SDMUX}" echo "### conf ###" +CONNECT_CNT=0 sdb start-server SLEEP=10 @@ -88,6 +89,7 @@ do fi sleep "${SLEEP}" SLEEP=$((SLEEP+10)) + CONNECT_CNT=$((CONNECT_CNT+1)) done printf "\n" @@ -103,6 +105,7 @@ fi copy_sdb "${SDMUX}" "${TESTLAB_SCRIPTS}/run/smoke_tests.sh" run_smoke_sdb "${SDMUX}" +echo "CONNECT_CNT $CONNECT_CNT" >> sysctl.result cat sysctl.result echo "### cleanup ###" diff --git a/tct/run/smoke_tests.sh b/tct/run/smoke_tests.sh index 9e76bd9..2c6068d 100755 --- a/tct/run/smoke_tests.sh +++ b/tct/run/smoke_tests.sh @@ -15,11 +15,17 @@ # limitations under the License. # Author: Aleksander Mistewicz <a.mistewicz@samsung.com> - -systemctl --state=failed | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m]//g" 2>&1 +SYS_RESULT_TMP="`mktemp`" +systemctl --state=failed | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m]//g" 2>&1 | tee "$SYS_RESULT_TMP" uptime BEFORE=`journalctl | wc -l` sleep 10 AFTER=`journalctl | wc -l` -echo "Lines in journal (growth in last 10s): " $AFTER "("$(($AFTER - $BEFORE))")" +JOURNAL_DIFF_CNT="$(($AFTER - $BEFORE))" +echo "Lines in journal (growth in last 10s): $AFTER ($JOURNAL_DIFF_CNT)" tree -L 2 /opt/share/crash/ + +echo SERVICES_FAIL_CNT $(grep -c "failed" "$SYS_RESULT_TMP") +echo JOURNAL_DIFF_CNT "$JOURNAL_DIFF_CNT" +echo JOURNAL_TOTAL_CNT "$AFTER" +echo OPT_CRASH_CNT $(find /opt/share/crash -maxdepth 2 | wc -l) |