Skip to content

Commit

Permalink
Fix Travis CI Shell Options (#2490)
Browse files Browse the repository at this point in the history
* Allow unset variables in travis_setup_env

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>

* Don't exit immediately for Travis regressions

Disables immediate failure when running travis_wait methods. These
tests need to keep going even if they fail to do things like print out
the log.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>

* Remove +verbose from JTAG regressions

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
  • Loading branch information
seldridge authored May 28, 2020
1 parent 4f78cbf commit 711851d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ ifdef SEED
SEED_ARG = --seed $(SEED)
endif

JTAG_DTM_SIM_ARGS = +verbose +jtag_rbb_enable=1 $(SEED_ARG)
JTAG_DTM_SIM_ARGS = +jtag_rbb_enable=1 $(SEED_ARG)

stamps/%/vsim-jtag-dtm-32-$(JTAG_DTM_TEST).stamp: stamps/%/vsim$(JTAG_STAMP_SUFFIX).stamp stamps/riscv-tests.stamp
RISCV=$(RISCV) PATH="$(abspath $(RISCV)/bin:$(PATH))" $(GDBSERVER) \
Expand Down
2 changes: 2 additions & 0 deletions regression/run-test-bucket
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ if [[ ${TRAVIS:-false} == true ]]; then
. "${regression_dir}/travis_setup_env.bash"
. "${regression_dir}/travis_jigger.bash"
. "${regression_dir}/travis_wait.bash"
set +u
travis_setup_env
set -u
else
# If not running on Travis CI, Stub out the travis_wait to be a no-op, since
# it's unnecessary and it has some undesirable side effects such as hiding
Expand Down
2 changes: 2 additions & 0 deletions regression/travis_wait.bash
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# https://github.com/travis-ci/travis-build/blob/73a5393263e0b135f49aceeb40ef6f0d827b9b11/lib/travis/build/bash/travis_wait.bash

travis_wait() {
set +e
local timeout="${1}"

if [[ "${timeout}" =~ ^[0-9]+$ ]]; then
Expand Down Expand Up @@ -56,5 +57,6 @@ travis_wait() {
echo -e "\\n${ANSI_GREEN}Log:${ANSI_RESET}\\n"
cat "${log_file}"

set -e
return "${result}"
}

0 comments on commit 711851d

Please sign in to comment.