From a2581d3450e81051b4a76d1caa6e532fe4c27c28 Mon Sep 17 00:00:00 2001 From: Samuel Karp Date: Fri, 23 Oct 2020 11:32:40 -0700 Subject: [PATCH] ci: run cri-integration target for all runtimes Signed-off-by: Samuel Karp --- .github/workflows/ci.yml | 4 +++- hack/test-utils.sh | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cea3966cc..dacb60318 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -311,8 +311,10 @@ jobs: working-directory: src/github.com/containerd/containerd - name: CRI Integration Test + env: + TEST_RUNTIME: ${{ matrix.runtime }} run: | - make cri-integration + CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration working-directory: src/github.com/containerd/containerd - name: cri-tools critest diff --git a/hack/test-utils.sh b/hack/test-utils.sh index 86a5e49fa..b3097b019 100755 --- a/hack/test-utils.sh +++ b/hack/test-utils.sh @@ -23,13 +23,24 @@ CONTAINERD_FLAGS="--log-level=debug " # Use a configuration file for containerd. CONTAINERD_CONFIG_FILE=${CONTAINERD_CONFIG_FILE:-""} -if [ -z "${CONTAINERD_CONFIG_FILE}" ] && command -v sestatus >/dev/null 2>&1; then - selinux_config="/tmp/containerd-config-selinux.toml" - cat >${selinux_config} <<<' +# The runtime to use (ignored when CONTAINERD_CONFIG_FILE is set) +CONTAINERD_RUNTIME=${CONTAINERD_RUNTIME:-""} +if [ -z "${CONTAINERD_CONFIG_FILE}" ]; then + config_file="/tmp/containerd-config-cri.toml" + truncate --size 0 "${config_file}" + if command -v sestatus >/dev/null 2>&1; then + cat >>${config_file} <>${config_file} <