Nathan Gieseker 57b42a7b99 Windows: Adds HCS Calls and Bug Fixes
Move the windows plugin to use the Host Compute (v2) APIs, as well
as clean-up the code. Allows win-bridge to use either the old API or Host Compute (v2) api
depending on a conf parameter. Fixes a leaked endpoint issue on windows for the v1 flow, and
removes the hns/pkg from the linux test run.
2019-02-27 08:49:34 -08:00

42 lines
926 B
Bash
Executable File

#!/usr/bin/env bash
#
# Run CNI plugin tests.
#
# This needs sudo, as we'll be creating net interfaces.
#
set -e
source ./build_linux.sh
echo "Running tests"
GINKGO_FLAGS="-p --randomizeAllSpecs --randomizeSuites --failOnPending --progress --skipPackage=pkg/hns"
# user has not provided PKG override
if [ -z "$PKG" ]; then
GINKGO_FLAGS="$GINKGO_FLAGS -r ."
LINT_TARGETS="./..."
# user has provided PKG override
else
GINKGO_FLAGS="$GINKGO_FLAGS $PKG"
LINT_TARGETS="$PKG"
fi
sudo -E bash -c "umask 0; cd ${GOPATH}/src/${REPO_PATH}; PATH=${GOROOT}/bin:$(pwd)/bin:${PATH} ginkgo ${GINKGO_FLAGS}"
cd ${GOPATH}/src/${REPO_PATH};
echo "Checking gofmt..."
fmtRes=$(go fmt $LINT_TARGETS)
if [ -n "${fmtRes}" ]; then
echo -e "go fmt checking failed:\n${fmtRes}"
exit 255
fi
echo "Checking govet..."
vetRes=$(go vet $LINT_TARGETS)
if [ -n "${vetRes}" ]; then
echo -e "govet checking failed:\n${vetRes}"
exit 255
fi