Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
test: get openshift runtime logs
Browse files Browse the repository at this point in the history
Get logs when running openshift
Fixes: #32

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Jan 10, 2018
1 parent bea28b6 commit 05c8168
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@

set -e
source /etc/os-release
start_test=$(date '+%Y-%m-%d %H:%M:%S')
last_test=$(date '+%Y-%m-%d %H:%M:%S')

function cleanup {
if (( "$?" != 0 )); then
echo "<===============================================>"
echo "DEBUG: Logs from all test "
sudo journalctl -t cc-runtime --since="${start_test}" --no-pager
echo "<===============================================>"
echo "<===============================================>"
echo "DEBUG: Logs from last test"
sudo journalctl -t cc-runtime --since="${last_test}" --no-pager
echo "<===============================================>"
fi
}

trap cleanup EXIT

if [ "$ID" == "ubuntu" ] && [ "$VERSION_ID" == "17.04" ]; then
export CRIO_STORAGE_DRIVER_OPTS="--storage-driver=devicemapper"
Expand All @@ -26,5 +43,6 @@ sudo -E PATH="$PATH" bash -c "make check"
# Currently, Openshift tests only work on Fedora.
# We should delete this condition, when it works for Ubuntu.
if [ "$ID" == fedora ]; then
last_test=$(date '+%Y-%m-%d %H:%M:%S')
sudo -E PATH="$PATH" bash -c "make openshift"
fi

0 comments on commit 05c8168

Please sign in to comment.