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 Mar 2, 2018
1 parent ae1126c commit a03a589
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@

set -e

check_log_files()
{
make log-parser

# XXX: Only the CC runtime uses structured logging,
# XXX: hence specify by name (rather than using $RUNTIME).
for component in \
kata-proxy \
kata-runtime-cc \
kata-shim
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 --debug --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 -eq 0 ] && true || false
}

export RUNTIME="kata-runtime"

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

check_log_files

0 comments on commit a03a589

Please sign in to comment.