mirror of
https://github.com/containers/youki
synced 2024-06-09 16:26:21 +02:00
Move OCI test script into scripts/
This commit is contained in:
parent
082bb12670
commit
446080fada
26
build.sh
26
build.sh
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
TARGET=${TARGET-x86_64-unknown-linux-gnu}
|
||||
if [ "$TARGET" != "" ]; then
|
||||
TGT="--target $TARGET"
|
||||
fi
|
||||
VERSION=debug
|
||||
if [ "$1" == "--release" ]; then
|
||||
VERSION=release
|
||||
fi
|
||||
|
||||
|
||||
# Runtimetest must be compiled in its dorectory and is
|
||||
# not a part of youki workspace. For the reasoning behind this,
|
||||
# please check the docs and readme
|
||||
|
||||
cargo build --verbose $TGT $1
|
||||
cd ./runtimetest
|
||||
cargo build --verbose $TGT $1
|
||||
cd ..
|
||||
|
||||
cp target/$TARGET/$VERSION/youki .
|
||||
cp target/$TARGET/$VERSION/integration_test ./youki_integration_test
|
||||
cp runtimetest/target/$TARGET/$VERSION/runtimetest ./runtimetest_tool
|
|
@ -3,10 +3,10 @@
|
|||
TGT = x86_64-unknown-linux-gnu
|
||||
|
||||
debug:
|
||||
cargo build && cp ./target/$(TGT)/debug/youki ./youki_bin
|
||||
cargo build $(TGT) && cp ./target/$(TGT)/debug/youki ./youki_bin
|
||||
|
||||
release:
|
||||
cargo build --release && cp ./target/$(TGT)/release/youki ./youki_bin
|
||||
cargo build --release $(TGT) && cp ./target/$(TGT)/release/youki ./youki_bin
|
||||
|
||||
clean:
|
||||
rm ./youki_bin
|
|
@ -1,10 +1,13 @@
|
|||
#!/bin/bash -eu
|
||||
|
||||
ROOT=$(pwd)
|
||||
RUNTIME=${ROOT}/youki
|
||||
./build.sh
|
||||
|
||||
SCRIPTS_DIR=$(pwd)
|
||||
RUNTIME=${SCRIPTS_DIR}/youki
|
||||
OCI_TEST_DIR=../integration_tests/oci-runtime-tools/src/github.com/opencontainers/runtime-tools
|
||||
PATTERN=${1:-.}
|
||||
|
||||
cd integration_test/runtime-tools/src/github.com/opencontainers/runtime-tools
|
||||
cd $OCI_TEST_DIR
|
||||
|
||||
test_cases=(
|
||||
"create/create.t"
|
||||
|
@ -106,7 +109,7 @@ for case in "${test_cases[@]}"; do
|
|||
echo "Running $case"
|
||||
logfile="./log/$case.log"
|
||||
mkdir -p "$(dirname $logfile)"
|
||||
sudo RUST_BACKTRACE=1 RUNTIME=${RUNTIME} ${ROOT}/integration_test/runtime-tools/src/github.com/opencontainers/runtime-tools/validation/$case >$logfile 2>&1 || (cat $logfile && exit 1)
|
||||
sudo RUST_BACKTRACE=1 RUNTIME=${RUNTIME} ../integration_test/runtime-tools/src/github.com/opencontainers/runtime-tools/validation/$case >$logfile 2>&1 || (cat $logfile && exit 1)
|
||||
if [ 0 -ne $(grep "not ok" $logfile | wc -l ) ]; then
|
||||
cat $logfile
|
||||
exit 1
|
Loading…
Reference in New Issue