Skip to content

Commit

Permalink
travis: run install and tests in new shells
Browse files Browse the repository at this point in the history
This had the effect of killing the travis script when a t.Fatal was hit.
As noted in the comment that was removed - a non-zero exit status makes
set -e exit, but this exits from the build script.
  • Loading branch information
kortschak committed Mar 30, 2019
1 parent 36a5df7 commit 2c9afff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ cache:

# Install the appropriate blas library (if any) and associated gonum software.
install:
- travis_wait 20 source ${TRAVIS_BUILD_DIR}/.travis/$TRAVIS_OS_NAME/$BLAS_LIB/install.sh
- travis_wait 20 ${TRAVIS_BUILD_DIR}/.travis/$TRAVIS_OS_NAME/$BLAS_LIB/install.sh

script:
- ${TRAVIS_BUILD_DIR}/.travis/check-imports.sh
- ${TRAVIS_BUILD_DIR}/.travis/check-copyright.sh
- source ${TRAVIS_BUILD_DIR}/.travis/$TRAVIS_OS_NAME/$BLAS_LIB/test.sh
- ${TRAVIS_BUILD_DIR}/.travis/$TRAVIS_OS_NAME/$BLAS_LIB/test.sh
- test -z "$(gofmt -d .)"
# This is run last since it alters the tree.
- ${TRAVIS_BUILD_DIR}/.travis/check-generate.sh
12 changes: 2 additions & 10 deletions .travis/linux/OpenBLAS/install.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -ex

CACHE_DIR=${TRAVIS_BUILD_DIR}/.travis/${BLAS_LIB}.cache
Expand Down Expand Up @@ -47,13 +49,3 @@ go get -v -x gonum.org/v1/netlib/...

# run the OS common installation script
source ${TRAVIS_BUILD_DIR}/.travis/$TRAVIS_OS_NAME/install.sh

# travis compiles commands in script and then executes in bash. By adding
# set -e we are changing the travis build script's behavior, and the set
# -e lives on past the commands we are providing it. Some of the travis
# commands are supposed to exit with non zero status, but then continue
# executing. set -x makes the travis log files extremely verbose and
# difficult to understand.
#
# see travis-ci/travis-ci#5120
set +ex
12 changes: 2 additions & 10 deletions .travis/linux/OpenBLAS/test.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
#!/bin/bash

set -ex

go env
go get -d -t -v ./...
export CGO_LDFLAGS="-L/usr/lib -lopenblas"
go test -a -v ./...
if [[ $TRAVIS_SECURE_ENV_VARS = "true" ]]; then bash -c "$GOPATH/src/gonum.org/v1/netlib/.travis/test-coverage.sh"; fi

# travis compiles commands in script and then executes in bash. By adding
# set -e we are changing the travis build script's behavior, and the set
# -e lives on past the commands we are providing it. Some of the travis
# commands are supposed to exit with non zero status, but then continue
# executing. set -x makes the travis log files extremely verbose and
# difficult to understand.
#
# see travis-ci/travis-ci#5120
set +ex

0 comments on commit 2c9afff

Please sign in to comment.