mirror of
https://github.com/containers/youki
synced 2024-05-04 06:36:15 +02:00
Remove the build dependency from some tests.
Signed-off-by: utam0k <k0ma@utam0k.jp>
This commit is contained in:
parent
c98c417f48
commit
0758953fd7
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -19,6 +19,8 @@ jobs:
|
|||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Build
|
||||
run: make release-build
|
||||
- name: test
|
||||
run: make test-all
|
||||
|
||||
|
|
6
Makefile
6
Makefile
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue