automated: linux: ltp: publish log files for kirk runs
kirk produces a JSON results file with the logs already collected,
what's very convenient.
Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh
index e3eb725..3becdd4 100755
--- a/automated/linux/ltp/ltp.sh
+++ b/automated/linux/ltp/ltp.sh
@@ -163,6 +163,9 @@
parse_ltp_json_results() {
jq -r '.results| .[]| "\(.test_fqn) \(.test.result)"' "$1" \
| sed 's/brok/fail/; s/conf/skip/' >> "${RESULT_FILE}"
+ for test_fqn in $(jq -r '.results| .[]| .test_fqn' "$1"); do
+ jq -r '.results | .[] | select(.test_fqn == "'"${test_fqn}"'") | .test.log' "$1" > ${OUTPUT}/${test_fqn}.log
+ done
}
# Run LTP test suite