Merge pull request #1312 from Random-Liu/travis-trusty

Explicitly specify trusty in travis.
This commit is contained in:
Lantao Liu 2019-10-09 13:01:57 -07:00 committed by GitHub
commit 22b18262e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 9 deletions

View File

@ -22,7 +22,7 @@ install:
- ps: $psversiontable
build_script:
- bash.exe -elc "mingw32-make"
- bash.exe -elc "mingw32-make.exe"
test_script:
- bash.exe -elc "mingw32-make test"
- bash.exe -elc "mingw32-make.exe test"

View File

@ -18,5 +18,6 @@ run:
deadline: 2m
skip-dirs:
- integration
- pkg/api
skip-files:
- ".*_test.go"
- ".*_test.go"

View File

@ -21,16 +21,14 @@ cache:
- "${HOME}/google-cloud-sdk/"
before_install:
# libseccomp in trusty is not new enough, need backports version.
- sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list"
- sudo apt-get update
# Enable ipv6 for dualstack integration test.
- sudo sysctl net.ipv6.conf.all.disable_ipv6=0
install:
- sudo apt-get install btrfs-tools
- sudo apt-get install libseccomp2/trusty-backports
- sudo apt-get install libseccomp-dev/trusty-backports
- sudo apt-get install libseccomp2
- sudo apt-get install libseccomp-dev
- sudo apt-get install socat
before_script:

View File

@ -190,7 +190,10 @@ install.tools: .install.gitvalidation .install.golangci-lint .install.vndr ## in
.install.golangci-lint:
@echo "$(WHALE) $@"
$(GO) get -u github.com/golangci/golangci-lint/cmd/golangci-lint
$(GO) get -d github.com/golangci/golangci-lint/cmd/golangci-lint
@cd $(GOPATH)/src/github.com/golangci/golangci-lint/cmd/golangci-lint; \
git checkout v1.18.0; \
go install
.install.vndr:
@echo "$(WHALE) $@"

View File

@ -22,6 +22,7 @@ import (
"flag"
"fmt"
"net"
"os"
"os/exec"
"strconv"
"strings"
@ -63,11 +64,12 @@ var criRoot = flag.String("cri-root", "/var/lib/containerd/io.containerd.grpc.v1
var runtimeHandler = flag.String("runtime-handler", "", "The runtime handler to use in the test.")
var containerdBin = flag.String("containerd-bin", "containerd", "The containerd binary name. The name is used to restart containerd during test.")
func init() {
func TestMain(m *testing.M) {
flag.Parse()
if err := ConnectDaemons(); err != nil {
logrus.WithError(err).Fatalf("Failed to connect daemons")
}
os.Exit(m.Run())
}
// ConnectDaemons connect cri plugin and containerd, and initialize the clients.