1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-05-21 15:06:07 +02:00
youki/scripts/rust_integration_tests.sh
Yashodhan 80f1f36ae9
Refactor test dir structure (#2421)
* Move individual rust-oci-tests components in the tests dir

We can use several things from test_framework and even integration_test
for additional tests such as podman rootless and wasm tests

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

* fix scripts and docs for the new dir structure

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

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
2023-10-10 21:00:02 +09:00

38 lines
697 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/integration_test/bundle.tar.gz ${ROOT}/bundle.tar.gz
fi
touch ${LOGFILE}
sudo ${ROOT}/integration_test 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