Skip to content

Commit

Permalink
[chore] Ensure tests fail in the CI (open-telemetry#17044)
Browse files Browse the repository at this point in the history
  • Loading branch information
MovieStoreGuy authored Dec 16, 2022
1 parent fb3f320 commit 7056582
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ clean:
find . -type f -name 'coverage.html' -delete
find . -type f -name 'integration-coverage.txt' -delete
find . -type f -name 'integration-coverage.html' -delete
find . -type f -name 'foresight-test-report.txt' -delete

.PHONY: genconfigdocs
genconfigdocs:
Expand Down
6 changes: 6 additions & 0 deletions Makefile.Common
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# In order to ensure make instructions fail if there is command that fails a pipe (ie: `go test ... | tee -a ./test_results.txt`)
# the value `-o pipefail` (or `set -o pipefail`) is added to each shell command that make runs
# otherwise in the example command pipe, only the exit code of `tee` is recorded instead of `go test` which can cause
# test to pass in CI when they should not.
SHELL=/bin/bash -o pipefail

# SRC_ROOT is the top of the source tree.
SRC_ROOT := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))

Expand Down

0 comments on commit 7056582

Please sign in to comment.