1
0
mirror of https://github.com/containers/youki synced 2024-09-19 18:37:40 +02:00
youki/scripts/contest.sh
Yashodhan 53adffe43a
Re enable skipped e2e tests (#2647)
* Add env var check for e2e tests not supported by runc

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>

* use nix to get domain name

* Extract the runc check into a function

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
2024-01-23 20:36:04 +09:00

38 lines
682 B
Bash
Executable File

#! /bin/sh -eu
ROOT=$(git rev-parse --show-toplevel)
RUNTIME=$1
if [ "$RUNTIME" = "" ]; then
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
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
echo "Validation successful for runtime $1"
exit 0