Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
CI: Add call to log parser
Browse files Browse the repository at this point in the history
Call the log parser at the end of the test run. It will check all
component log files and display a detailed error message if any issues
are found.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
  • Loading branch information
jodh-intel committed Feb 28, 2018
1 parent ace9bd4 commit 32589ab
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,37 @@

set -e

check_log_files()
{
make log-parser

for component in \
kata-proxy \
kata-shim \
"${RUNTIME}"
do
file="${component}.log"
args="--no-pager -q -o cat -a -t \"${component}\""

cmd="sudo journalctl ${args} > ${file}"
eval "$cmd"
done

logs=$(ls "$(pwd)"/*.log)
{ kata-log-parser --check-only --error-if-no-records $logs; ret=$?; } || true

# Always remove logs since:
#
# - We don't want to waste disk-space.
# - The teardown script will save the full logs anyway.
# - the log parser tool shows full details of what went wrong.
rm -f $logs

[ $ret -ne 0 ] && false
}

export RUNTIME="kata-runtime"

sudo -E PATH="$PATH" bash -c "make check"

check_log_files

0 comments on commit 32589ab

Please sign in to comment.