mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Fix up not-yet-ready build/... stuff for godep
This commit is contained in:
@@ -45,17 +45,17 @@ RUN cd /usr/local/go/src && \
|
||||
|
||||
# Set up Go Environment
|
||||
ENV PATH /go/bin:$PATH
|
||||
ENV GOPATH /go:/go/src/github.com/GoogleCloudPlatform/kubernetes/third_party
|
||||
ENV GOPATH /go
|
||||
ENV GOOS linux
|
||||
ENV GOARCH amd64
|
||||
|
||||
# Get the code coverage tool and etcd for integration tests
|
||||
RUN go get code.google.com/p/go.tools/cmd/cover github.com/coreos/etcd
|
||||
RUN go get code.google.com/p/go.tools/cmd/cover github.com/coreos/etcd github.com/tools/godep
|
||||
|
||||
# Mark this as a kube-build container
|
||||
RUN touch /kube-build-image
|
||||
|
||||
WORKDIR /go/src/github.com/GoogleCloudPlatform/kubernetes
|
||||
|
||||
# Upload Kubernetes
|
||||
# Upload Kubernetes source
|
||||
ADD kube-source.tar.gz /go/src/github.com/GoogleCloudPlatform/kubernetes
|
||||
|
@@ -42,7 +42,7 @@ function make-binaries() {
|
||||
|
||||
function make-binary() {
|
||||
echo "+++ Building $1 for ${GOOS}/${GOARCH}"
|
||||
go build \
|
||||
godep go build \
|
||||
-o "${ARCH_TARGET}/$1" \
|
||||
github.com/GoogleCloudPlatform/kubernetes/cmd/$1
|
||||
}
|
||||
|
@@ -19,27 +19,11 @@ set -e
|
||||
|
||||
source $(dirname $0)/common.sh
|
||||
|
||||
find_test_dirs() {
|
||||
(
|
||||
cd ${KUBE_REPO_ROOT}
|
||||
find . -not \( \
|
||||
\( \
|
||||
-wholename './third_party' \
|
||||
-o -wholename './output' \
|
||||
\) -prune \
|
||||
\) -name '*_test.go' -print0 | xargs -0n1 dirname | sort -u
|
||||
)
|
||||
}
|
||||
|
||||
cd "${KUBE_TARGET}"
|
||||
|
||||
echo "+++ Running unit tests"
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
go test -cover -coverprofile=tmp.out "$KUBE_GO_PACKAGE/$1"
|
||||
godep go test -cover -coverprofile=tmp.out "$KUBE_GO_PACKAGE/$1"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for package in $(find_test_dirs); do
|
||||
go test -cover -coverprofile=tmp.out "${KUBE_GO_PACKAGE}/${package}"
|
||||
done
|
||||
godep go test ./...
|
||||
|
Reference in New Issue
Block a user