1
0
Fork 0
mirror of https://github.com/containers/youki synced 2024-04-24 19:05:32 +02:00

Remove the build dependency from some tests.

Signed-off-by: utam0k <k0ma@utam0k.jp>
This commit is contained in:
utam0k 2022-05-09 21:10:04 +09:00
parent c98c417f48
commit 0758953fd7
No known key found for this signature in database
GPG Key ID: 14ACDDE088DF059E
7 changed files with 28 additions and 6 deletions

View File

@ -27,7 +27,7 @@ jobs:
profile: minimal
- name: Building PR branch
run: ./build.sh --release
run: make release-build
- name: Uploading PR build to artifact
uses: actions/upload-artifact@v2

View File

@ -44,5 +44,7 @@ jobs:
sudo chmod 755 /usr/bin/runc
- name: Validate tests on runc
run: make validate-rust-tests
- name: Build
run: make release-build
- name: Validate tests on youki
run: make integration-test

View File

@ -124,5 +124,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: "1.17.6"
- name: Build
run: make release-build
- name: Run integration tests
run: make oci-integration-test

View File

@ -19,6 +19,8 @@ jobs:
with:
toolchain: stable
override: true
- name: Build
run: make release-build
- name: test
run: make test-all

View File

@ -11,13 +11,13 @@ test-all: test oci-integration-test integration-test
test: build
cd crates && cargo test
oci-integration-test: release-build
oci-integration-test:
./scripts/oci_integration_tests.sh $(ROOT)
integration-test: release-build
integration-test:
./scripts/rust_integration_tests.sh $(ROOT)/youki
validate-rust-tests: release-build
validate-rust-tests:
./scripts/rust_integration_tests.sh runc
clean:

View File

@ -86,6 +86,13 @@ check_environment() {
fi
}
if [[ ! -e $RUNTIME ]]; then
if ! which $RUNTIME ; then
echo "$RUNTIME not found"
exit 1
fi
fi
for case in "${test_cases[@]}"; do
if [[ ! -e "${OCI_TEST_DIR}/validation/$case" ]]; then
GO111MODULE=auto GOPATH=${ROOT}/tests/oci-runtime-tests make runtimetest validation-executables

View File

@ -1,11 +1,20 @@
#! /bin/sh -eu
ROOT=$(git rev-parse --show-toplevel)
RUNTIME=$1
if [ "$1" = "" ]; then
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"
@ -15,7 +24,7 @@ if [ ! -f ${ROOT}/bundle.tar.gz ]; then
fi
touch ${LOGFILE}
sudo YOUKI_LOG_LEVEL="error" ${ROOT}/integration_test run --runtime "$1" --runtimetest ${ROOT}/runtimetest > $LOGFILE
sudo YOUKI_LOG_LEVEL="error" ${ROOT}/integration_test run --runtime "$RUNTIME" --runtimetest ${ROOT}/runtimetest > $LOGFILE
if [ 0 -ne $(grep "not ok" $LOGFILE | wc -l ) ]; then
cat $LOGFILE