diff options
-rw-r--r-- | android/bootchart.yaml | 1 | ||||
-rwxr-xr-x | android/scripts/bootchart.sh | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/android/bootchart.yaml b/android/bootchart.yaml index a5b16d7..79b3150 100644 --- a/android/bootchart.yaml +++ b/android/bootchart.yaml @@ -18,7 +18,6 @@ params: run: steps: - ./android/scripts/bootchart.sh $OPERATION $BOOTCHART_TIME - - lava-test-run-attach /data/local/tmp/bootchart.tgz application/x-gzip parse: pattern: "(?P<test_case_id>\\w+):\\s+(?P<result>(pass|fail))" diff --git a/android/scripts/bootchart.sh b/android/scripts/bootchart.sh index 183dc46..d1f969c 100755 --- a/android/scripts/bootchart.sh +++ b/android/scripts/bootchart.sh @@ -26,7 +26,8 @@ LOGROOT="/data/bootchart" start_f="${LOGROOT}/start" stop_f="${LOGROOT}/stop" -TARBALL="/data/local/tmp/bootchart.tgz" +DATA_TMP="/data/local/tmp" +TARBALL="${DATA_TMP}/bootchart.tgz" start_bootchart(){ echo "${BOOTCHART_TIME}" > ${start_f} @@ -58,14 +59,20 @@ collect_data(){ echo "There is no ${LOGROOT} directory!" return fi - cd ${LOGROOT} + cd ${LOGROOT} || exit 1 + # shellcheck disable=SC2086 tar -czvf ${TARBALL} ${FILES} if [ $? -ne 0 ]; then echo "bootchart_collect_data: fail" else echo "bootchart_collect_data: pass" fi + # shellcheck disable=SC2086 rm -fr ${FILES} + cd ${DATA_TMP} || exit 1 + if [ -n "$(which lava-test-run-attach)" ]; then + lava-test-run-attach bootchart.tgz application/x-gzip + fi } main(){ |