Skip to content

Commit

Permalink
Move test dependencies to test dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Sep 11, 2023
1 parent af7c925 commit 9ad24ea
Show file tree
Hide file tree
Showing 574 changed files with 1,287 additions and 503,787 deletions.
31 changes: 16 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ output/windows_amd64/bin/%.exe: $(PKG_SOURCES)
touch $@

output/windows_amd64/test/bin/%.exe: $(PKG_SOURCES)
cd test && \
GOOS=windows GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on go build \
-mod vendor \
-o $@ \
-o ../$@ \
-tags "$(WINDOWS_BUILD_TAGS)" \
./test/e2e/$(subst -,,$*)
./e2e/$(subst -,,$*)

output/linux_amd64/bin/%: $(PKG_SOURCES)
GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \
Expand All @@ -157,12 +157,12 @@ output/linux_amd64/bin/%: $(PKG_SOURCES)
touch $@

output/linux_amd64/test/bin/%: $(PKG_SOURCES)
cd test && \
GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \
CC=x86_64-linux-gnu-gcc go build \
-mod vendor \
-o $@ \
-o ../$@ \
-tags "$(LINUX_BUILD_TAGS)" \
./test/e2e/$(subst -,,$*)
./e2e/$(subst -,,$*)

output/linux_arm64/bin/%: $(PKG_SOURCES)
GOOS=linux GOARCH=arm64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \
Expand All @@ -175,12 +175,12 @@ output/linux_arm64/bin/%: $(PKG_SOURCES)
touch $@

output/linux_arm64/test/bin/%: $(PKG_SOURCES)
cd test && \
GOOS=linux GOARCH=arm64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \
CC=aarch64-linux-gnu-gcc go build \
-mod vendor \
-o $@ \
-o ../$@ \
-tags "$(LINUX_BUILD_TAGS)" \
./test/e2e/$(subst -,,$*)
./e2e/$(subst -,,$*)

# In the future these targets should be deprecated.
./bin/log-counter: $(PKG_SOURCES)
Expand All @@ -204,11 +204,11 @@ endif
./cmd/nodeproblemdetector

./test/bin/problem-maker: $(PKG_SOURCES)
cd test && \
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GO111MODULE=on go build \
-mod vendor \
-o test/bin/problem-maker \
-o bin/problem-maker \
-tags "$(LINUX_BUILD_TAGS)" \
./test/e2e/problemmaker/problem_maker.go
./e2e/problemmaker/problem_maker.go

./bin/health-checker: $(PKG_SOURCES)
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GO111MODULE=on go build \
Expand All @@ -222,12 +222,13 @@ test: vet fmt
GO111MODULE=on go test -mod vendor -timeout=1m -v -race -short -tags "$(HOST_PLATFORM_BUILD_TAGS)" ./...

e2e-test: vet fmt build-tar
GO111MODULE=on go run github.com/onsi/ginkgo/ginkgo -nodes=$(PARALLEL) -mod vendor -timeout=10m -v -tags "$(HOST_PLATFORM_BUILD_TAGS)" -stream \
./test/e2e/metriconly/... -- \
cd test && \
GO111MODULE=on go run github.com/onsi/ginkgo/ginkgo -nodes=$(PARALLEL) -timeout=10m -v -tags "$(HOST_PLATFORM_BUILD_TAGS)" -stream \
./e2e/metriconly/... -- \
-project=$(PROJECT) -zone=$(ZONE) \
-image=$(VM_IMAGE) -image-family=$(IMAGE_FAMILY) -image-project=$(IMAGE_PROJECT) \
-ssh-user=$(SSH_USER) -ssh-key=$(SSH_KEY) \
-npd-build-tar=`pwd`/$(TARBALL) \
-npd-build-tar=`pwd`/../$(TARBALL) \
-boskos-project-type=$(BOSKOS_PROJECT_TYPE) -job-name=$(JOB_NAME) \
-artifacts-dir=$(ARTIFACTS)

Expand Down
18 changes: 3 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,20 @@ require (
github.com/euank/go-kmsg-parser v2.0.0+incompatible
github.com/golang/glog v1.1.1
github.com/hpcloud/tail v1.0.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.27.8
github.com/pborman/uuid v1.2.1
github.com/prometheus/client_model v0.4.0
github.com/prometheus/common v0.44.0
github.com/prometheus/procfs v0.10.1
github.com/shirou/gopsutil/v3 v3.23.8
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
go.opencensus.io v0.24.0
golang.org/x/crypto v0.11.0
golang.org/x/oauth2 v0.9.0
golang.org/x/sys v0.11.0
google.golang.org/api v0.114.0
k8s.io/api v0.28.1
k8s.io/apimachinery v0.28.1
k8s.io/client-go v9.0.0+incompatible
k8s.io/component-base v0.28.1
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/boskos v0.0.0-20200515170311-7d36bde8cdf6
)

require (
Expand All @@ -43,7 +36,6 @@ require (
cloud.google.com/go/trace v1.9.0 // indirect
github.com/aws/aws-sdk-go v1.35.24 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -54,7 +46,6 @@ require (
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
Expand All @@ -64,8 +55,6 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -76,22 +65,22 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo/v2 v2.9.7 // indirect
github.com/onsi/gomega v1.27.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/oauth2 v0.9.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e // indirect
Expand All @@ -105,7 +94,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/test-infra v0.0.0-20200514184223-ba32c8aae783 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 9ad24ea

Please sign in to comment.