Skip to content

Commit

Permalink
Temp changes to runc oci tests on runc
Browse files Browse the repository at this point in the history
  • Loading branch information
YJDoc2 committed Feb 26, 2024
1 parent 919ff4a commit 8524e49
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/temp.yaml
Original file line number Diff line number Diff line change
@@ -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

7 changes: 3 additions & 4 deletions scripts/oci_integration_tests.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

0 comments on commit 8524e49

Please sign in to comment.