2022-02-19 18:59:10 +01:00
|
|
|
#! /bin/sh -eu
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-02-06 11:52:18 +01:00
|
|
|
ROOT=$(git rev-parse --show-toplevel)
|
2022-05-09 14:10:04 +02:00
|
|
|
RUNTIME=$1
|
2022-02-06 11:52:18 +01:00
|
|
|
|
2022-05-09 14:10:04 +02:00
|
|
|
if [ "$RUNTIME" = "" ]; then
|
2022-02-19 19:39:14 +01:00
|
|
|
echo "please specify runtime"
|
|
|
|
exit 1
|
2022-02-06 11:30:01 +01:00
|
|
|
fi
|
2022-05-09 14:10:04 +02:00
|
|
|
|
|
|
|
if [ ! -e $RUNTIME ]; then
|
|
|
|
if ! which $RUNTIME ; then
|
|
|
|
echo "$RUNTIME not found"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-03-11 13:54:44 +01:00
|
|
|
ROOT=${2-$(git rev-parse --show-toplevel)}
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-03-11 13:54:44 +01:00
|
|
|
LOGFILE="${ROOT}/test.log"
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-03-11 13:54:44 +01:00
|
|
|
if [ ! -f ${ROOT}/bundle.tar.gz ]; then
|
2022-04-19 14:19:27 +02:00
|
|
|
cp ${ROOT}/tests/rust-integration-tests/integration_test/bundle.tar.gz ${ROOT}/bundle.tar.gz
|
2022-03-11 13:54:44 +01:00
|
|
|
fi
|
2022-02-06 11:52:18 +01:00
|
|
|
touch ${LOGFILE}
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-05-09 14:10:04 +02:00
|
|
|
sudo YOUKI_LOG_LEVEL="error" ${ROOT}/integration_test run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE
|
2022-02-06 11:30:01 +01:00
|
|
|
|
|
|
|
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"
|
2022-02-06 11:30:01 +01:00
|
|
|
exit 0
|
|
|
|
|
|
|
|
|