1
0
mirror of https://github.com/containers/youki synced 2024-12-03 18:48:22 +01:00
youki/scripts/contest.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
682 B
Bash
Raw Normal View History

2022-02-19 18:59:10 +01:00
#! /bin/sh -eu
2022-02-06 11:52:18 +01:00
ROOT=$(git rev-parse --show-toplevel)
RUNTIME=$1
2022-02-06 11:52:18 +01:00
if [ "$RUNTIME" = "" ]; then
2022-02-19 19:39:14 +01:00
echo "please specify runtime"
exit 1
fi
if [ ! -e $RUNTIME ]; then
if ! which $RUNTIME ; then
echo "$RUNTIME not found"
exit 1
fi
fi
ROOT=${2-$(git rev-parse --show-toplevel)}
LOGFILE="${ROOT}/test.log"
if [ ! -f ${ROOT}/bundle.tar.gz ]; then
cp ${ROOT}/tests/contest/contest/bundle.tar.gz ${ROOT}/bundle.tar.gz
fi
2022-02-06 11:52:18 +01:00
touch ${LOGFILE}
${ROOT}/contest run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE
if [ 0 -ne $(grep "not ok" $LOGFILE | wc -l ) ]; then
cat $LOGFILE
exit 1
fi
2022-02-19 19:39:14 +01:00
echo "Validation successful for runtime $1"
exit 0