Run tests for the s390x build

It turns out it is possible to run the unit tests for the s390x build
on travis by renaming the s390x specific files, so that their
inclusion in the build is determined only by tags and not by filename,
and by introducing a new tag s390x_test that we can use to force
their inclusion into a build by using this tag.  The .travis file is
then updated to include the line

go test --tags s390x_test ./...

This creates a build on travis that includes the s390x specific
files and runs the unit tests.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit is contained in:
Mark Ryan 2018-12-03 15:53:16 +01:00
parent 09923e8ed7
commit d6173077f1
5 changed files with 5 additions and 4 deletions

View File

@ -21,3 +21,4 @@ script:
- $GOPATH/bin/goveralls -v -service=travis-ci
- gometalinter --tests --vendor --disable-all --enable=misspell --enable=vet --enable=ineffassign --enable=gofmt --enable=gocyclo --cyclo-over=15 --enable=golint --enable=errcheck --enable=deadcode --enable=staticcheck -enable=gas ./...
- GOARCH=s390x go install ./...
- go test --tags s390x_test ./...

View File

@ -1,4 +1,4 @@
// +build !s390x
// +build !s390x,!s390x_test
/*
// Copyright contributors to the Virtual Machine Manager for Go project

View File

@ -1,4 +1,4 @@
// +build !s390x
// +build !s390x,!s390x_test
/*
// Copyright contributors to the Virtual Machine Manager for Go project

View File

@ -1,4 +1,4 @@
// +build s390x
// +build s390x s390x_test
/*
// Copyright contributors to the Virtual Machine Manager for Go project

View File

@ -1,4 +1,4 @@
// +build s390x
// +build s390x s390x_test
/*
// Copyright contributors to the Virtual Machine Manager for Go project