From 8524e4934f781bf76e4cc61cb0338db7cce808df Mon Sep 17 00:00:00 2001 From: Yashodhan Joshi Date: Mon, 26 Feb 2024 21:33:37 +0530 Subject: [PATCH] Temp changes to runc oci tests on runc --- .github/workflows/temp.yaml | 30 ++++++++++++++++++++++++++++++ scripts/oci_integration_tests.sh | 7 +++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/temp.yaml diff --git a/.github/workflows/temp.yaml b/.github/workflows/temp.yaml new file mode 100644 index 000000000..0d84d36c3 --- /dev/null +++ b/.github/workflows/temp.yaml @@ -0,0 +1,30 @@ +name: validate oci go tests on runc + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + oci-validation-go-runc: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Install just + uses: taiki-e/install-action@just + - uses: actions/setup-go@v4 + with: + go-version: '1.20' + cache: true + cache-dependency-path: tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools/go.sum + - name: Run integration tests + run: just test-oci + diff --git a/scripts/oci_integration_tests.sh b/scripts/oci_integration_tests.sh index c96a110e6..aa75130d0 100755 --- a/scripts/oci_integration_tests.sh +++ b/scripts/oci_integration_tests.sh @@ -1,8 +1,8 @@ -#!/bin/bash -eu +#!/bin/bash ROOT=$(git rev-parse --show-toplevel) -RUNTIME=${1:-.}/youki +RUNTIME=runc OCI_TEST_DIR=${ROOT}/tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools PATTERN=${2:-.} cd $OCI_TEST_DIR @@ -119,14 +119,13 @@ for case in "${test_cases[@]}"; do echo "Running $case" logfile="./log/$case.log" mkdir -p "$(dirname $logfile)" - sudo RUST_BACKTRACE=1 RUNTIME=${RUNTIME} ${OCI_TEST_DIR}/validation/$case >$logfile 2>&1 || (cat $logfile && exit 1) + sudo RUST_BACKTRACE=1 RUNTIME=${RUNTIME} ${OCI_TEST_DIR}/validation/$case >$logfile 2>&1 || (cat $logfile) if [ 0 -ne $(grep "not ok" $logfile | wc -l ) ]; then if [ 0 -eq $(grep "# cgroupv2 is not supported yet " $logfile | wc -l ) ]; then echo "Skip $case because oci-runtime-tools doesn't support cgroup v2" continue; fi cat $logfile - exit 1 fi sleep 1 done