提交 1d917c56 编写于 作者: L Lucas Käldström

Add a testing script

上级 1dc3433b
......@@ -7,4 +7,4 @@ install:
- echo "Don't run anything."
# Don't test vendored code.
script: go test $(go list ./... | grep -v /vendor/)
script: ./test.sh
......@@ -72,7 +72,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for an overview of how to send pull reque
Unit tests are run on Travis before code is merged. To run as part of a development cycle:
```shell
go test $(go list ./... | grep -v /vendor/)
./test.sh
```
#### Integration Tests
......
#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# 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.
cd "$( dirname "${BASH_SOURCE[0]}" )"
REPO_PATH="k8s.io/minikube"
export GOPATH=${PWD}/gopath
export GOPATH=${PWD}/.gopath
export GO15VENDOREXPERIMENT=1
export OS=${OS:-$(go env GOOS)}
export ARCH=${ARCH:-$(go env GOARCH)}
......
#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# 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.
# First, build the binary
source ./build.sh
# Then run all test files
for TEST in $(find -name "*.go" | grep -v vendor | grep -v integration | grep _test.go | cut -d/ -f2- | sed 's|/\w*.go||g' | uniq); do
echo $TEST
go test -v ${REPO_PATH}/${TEST}
done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册