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)
|
|
|
|
|
|
|
|
SCRIPT_DIR=${ROOT}/scripts
|
|
|
|
|
2022-02-19 19:39:14 +01:00
|
|
|
if [ "$1" = "" ]; then
|
|
|
|
echo "please specify runtime"
|
|
|
|
exit 1
|
2022-02-06 11:30:01 +01:00
|
|
|
fi
|
|
|
|
|
2022-02-06 11:52:18 +01:00
|
|
|
LOGFILE="${SCRIPT_DIR}/test.log"
|
|
|
|
|
|
|
|
cd ${SCRIPT_DIR}
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-02-06 11:52:18 +01:00
|
|
|
${SCRIPT_DIR}/build.sh
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-02-06 11:52:18 +01:00
|
|
|
cp ${ROOT}/integration_tests/rust-integration-tests/integration_test/bundle.tar.gz ${SCRIPT_DIR}/bundle.tar.gz
|
|
|
|
touch ${LOGFILE}
|
2022-02-06 11:30:01 +01:00
|
|
|
|
2022-02-19 19:39:14 +01:00
|
|
|
YOUKI_LOG_LEVEL="error" sudo ./integration_test run --runtime "$1" --runtimetest ./runtimetest > $LOGFILE
|
2022-02-06 11:30:01 +01:00
|
|
|
|
|
|
|
# remove the files copied
|
|
|
|
./clean.sh
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|