Skip to content

Commit

Permalink
Consolidate how we are calling the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynvs committed Feb 25, 2018
1 parent 1abdc29 commit 3b0148e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
install: skip
env:
- DEPTESTBYPASS501=1
script: go test -race ./...
script: make test
- <<: *simple-test
go: tip
- <<: *simple-test
Expand All @@ -46,7 +46,7 @@ jobs:
# for future safety.
# Related: https://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- trap EXIT
- go test -race ./...
- make test
- go: 1.10.x
stage: deploy
go_import_path: github.com/golang/dep
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ validate: build licenseok
./hack/validate-licence.bash

test:
go test ./...
./hack/test.bash

install: build
cp ./dep $(GOBIN)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ deploy: false

test_script:
- go build github.com/golang/dep/cmd/dep
- for /f "" %%G in ('go list github.com/golang/dep/...') do ( go test %%G & IF ERRORLEVEL == 1 EXIT 1)
- go test ./...
17 changes: 17 additions & 0 deletions hack/test.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Copyright 2017 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
#
# This script will build dep and calculate hash for each
# (DEP_BUILD_PLATFORMS, DEP_BUILD_ARCHS) pair.
# DEP_BUILD_PLATFORMS="linux" DEP_BUILD_ARCHS="amd64" ./hack/build-all.bash
# can be called to build only for linux-amd64

set -e

IMPORT_DURING_SOLVE=${IMPORT_DURING_SOLVE:-false}

go test -race \
-ldflags '-X github.com/golang/dep/cmd/dep.flagImportDuringSolve=${IMPORT_DURING_SOLVE}' \
./...

0 comments on commit 3b0148e

Please sign in to comment.