summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-08-03 15:48:09 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-08-04 06:13:04 +0900
commit97063ee76decb4105ad3991dcf34432f5e009f9d (patch)
tree202f82834e19d561f90aafbd4befe8a5d808e09c
parent11f3fcc7ef7b05948b64412ffc8fca90ae097ce1 (diff)
update travis-ci for dep
libraries are installed into vendor directory so we can't build go code outside. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--.travis.yml6
-rw-r--r--test/lib/base.py3
-rw-r--r--test/scenario_test/ci-scripts/build_embeded_go.py6
3 files changed, 8 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 22c2b753..edc63a1e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,12 +8,12 @@ install: test/scenario_test/ci-scripts/travis-install-script.sh
script: test/scenario_test/ci-scripts/travis-build-script.sh
_simple_install: &_simple_install
- before_install: true
- install: go get -t ./...
+ before_install: go get -u github.com/golang/dep/cmd/dep
+ install: $GOPATH/bin/dep ensure
_unittest: &_unittest
<<: *_simple_install
- script: go test ./...
+ script: go test $(go list ./... | grep -v '/vendor/')
_cross_compile: &_cross_compile
go: 1.7
diff --git a/test/lib/base.py b/test/lib/base.py
index 8f251283..08111420 100644
--- a/test/lib/base.py
+++ b/test/lib/base.py
@@ -120,8 +120,9 @@ def make_gobgp_ctn(tag='gobgp', local_gobgp_path='', from_image='osrg/quagga'):
c << 'FROM {0}'.format(from_image)
c << 'RUN go get -d github.com/osrg/gobgp/...; exit 0'
c << 'RUN rm -rf /go/src/github.com/osrg/gobgp'
+ c << 'RUN go get -u github.com/golang/dep/cmd/dep'
c << 'ADD gobgp /go/src/github.com/osrg/gobgp/'
- c << 'RUN go get github.com/osrg/gobgp/...'
+ c << 'RUN cd /go/src/github.com/osrg/gobgp && dep ensure && go install ./gobgpd ./gobgp'
rindex = local_gobgp_path.rindex('gobgp')
if rindex < 0:
diff --git a/test/scenario_test/ci-scripts/build_embeded_go.py b/test/scenario_test/ci-scripts/build_embeded_go.py
index e0f17e56..4bfc3848 100644
--- a/test/scenario_test/ci-scripts/build_embeded_go.py
+++ b/test/scenario_test/ci-scripts/build_embeded_go.py
@@ -20,9 +20,9 @@ def cut(filename, out):
if __name__ == '__main__':
filename = sys.argv[1]
- out = '/tmp/test.go'
+ out = 'hoge.go'
cut(filename, out)
- ret = call(['go', 'build', '-o', '/tmp/test', out])
+ ret = call(['go', 'build', '-o', 'hoge', out])
os.remove(out)
- os.remove('/tmp/test')
+ os.remove('hoge')
sys.exit(ret)