DESCRIPTION:
Makefile's test and entry targets capture exit code by writing $$? to a file. With .SHELLFLAGS := -e -o pipefail -c, set -e causes the recipe to ABORT immediately on a failing command - echo "$$?" never runs. The verify target reads back the file and asserts it's 0, but a failing test will leave the previous file (or no file) value. Test failures are silently masked.
REPRODUCTION:
- Add
exit 1 to test command in a docker container.
- Verify passes anyway because set -e halts before echo.
IMPACT:
Test failures silently masked. CI green on broken code. CRITICAL bug.
RELATED FILES:
Makefile
entry.sh (related)
DESCRIPTION:
Makefile's
testandentrytargets capture exit code by writing$$?to a file. With.SHELLFLAGS := -e -o pipefail -c,set -ecauses the recipe to ABORT immediately on a failing command -echo "$$?"never runs. The verify target reads back the file and asserts it's 0, but a failing test will leave the previous file (or no file) value. Test failures are silently masked.REPRODUCTION:
exit 1to test command in a docker container.IMPACT:
Test failures silently masked. CI green on broken code. CRITICAL bug.
RELATED FILES:
Makefile
entry.sh (related)