Add CRI Validation test.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-09-09 16:17:04 -07:00
parent dc964de85f
commit 7e96aaab09
16 changed files with 440 additions and 26 deletions

45
test/windows/test.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
# Copyright The containerd Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o errexit
set -o nounset
set -o pipefail
export PATH="/c/Program Files/Containerd:$PATH"
REPO_TAR="${REPO_TAR:-"/c/cri.tar.gz"}"
FOCUS="${FOCUS:-"Conformance"}"
SKIP="${SKIP:-"portforward"}"
REPORT_DIR="${REPORT_DIR:-"/c/_artifacts"}"
repo="$GOPATH/src/github.com/containerd/cri"
mkdir -p "${repo}"
cd "${repo}"
tar -xzf "${REPO_TAR}"
make install.deps
make install -e BINDIR="/c/Program Files/Containerd"
mkdir -p "${REPORT_DIR}"
containerd -log-level debug &> "${REPORT_DIR}/containerd.log" &
pid=$!
ctr version
set +o errexit
critest --runtime-endpoint=npipe:////./pipe/containerd-containerd --ginkgo.focus="${FOCUS}" --ginkgo.skip="${SKIP}" --report-dir="${REPORT_DIR}" --report-prefix="windows"
TEST_RC=$?
set -o errexit
kill -9 $pid
echo -n "${TEST_RC}" > "${REPORT_DIR}/exitcode"