Skip to content

Commit 2a5566b

Browse files
committed
Ensure a non-zero exit status if a pipe fails
1 parent d4bb67f commit 2a5566b

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

tools/make/lib/test-fixtures/c.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in C to generate test fixtures.
77

88
test-fixtures-c:
9-
$(QUIET) $(FIND_C_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_C_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
cd `dirname $$file` && \

tools/make/lib/test-fixtures/cpp.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in C++ to generate test fixtures.
77

88
test-fixtures-cpp:
9-
$(QUIET) $(FIND_CPP_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_CPP_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
cd `dirname $$file` && \

tools/make/lib/test-fixtures/fortran.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in Fortran to generate test fixtures.
77

88
test-fixtures-fortran:
9-
$(QUIET) $(FIND_FORTRAN_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_FORTRAN_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
cd `dirname $$file` && \

tools/make/lib/test-fixtures/julia.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in Julia to generate test fixtures. Note that we assume the scripts can be run using Julia.
77

88
test-fixtures-julia:
9-
$(QUIET) $(FIND_JULIA_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_JULIA_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
$(MAKE_EXECUTABLE) $$file && $$file || exit 1; \

tools/make/lib/test-fixtures/python.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in Python to generate test fixtures.
77

88
test-fixtures-python:
9-
$(QUIET) $(FIND_PYTHON_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_PYTHON_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
$(PYTHON) $$file || exit 1; \

tools/make/lib/test-fixtures/r.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This target runs scripts written in R to generate test fixtures. Note that we assume the scripts can be run using R.
77

88
test-fixtures-r:
9-
$(QUIET) $(FIND_R_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
9+
$(QUIET) set -o pipefail ; $(FIND_R_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
1010
echo ""; \
1111
echo "Generating test fixtures: $$file"; \
1212
$(MAKE_EXECUTABLE) $$file && $$file || exit 1; \

0 commit comments

Comments
 (0)