Skip to content

Commit 6b6d961

Browse files
committed
Check for mutant exit code.
1 parent aef59f5 commit 6b6d961

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ecommerce/pricing/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ ifeq ($(origin MUTANT_NODE_INDEX), environment)
4747
else \
4848
echo "Attempting to run mutant for derived subjects (mutant should apply its own ignore rules): $$SUBJECT_ARGS"; \
4949
RAILS_ENV=test bundle exec mutant run $$SUBJECT_ARGS; \
50+
MUTANT_EXIT_CODE=$$?; \
51+
if [ $$MUTANT_EXIT_CODE -ne 0 ]; then \
52+
echo "ERROR: mutant run failed with exit code $$MUTANT_EXIT_CODE"; \
53+
exit $$MUTANT_EXIT_CODE; \
54+
fi; \
5055
fi; \
5156
rm -f .all_files.tmp .node_files.tmp
5257
else

rails_application/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ ifeq ($(origin MUTANT_NODE_INDEX), environment)
6363
else \
6464
echo "Attempting to run mutant for derived subjects (mutant should apply its own ignore rules): $$SUBJECT_ARGS"; \
6565
RAILS_ENV=test bundle exec mutant run $$SUBJECT_ARGS; \
66+
MUTANT_EXIT_CODE=$$?; \
67+
if [ $$MUTANT_EXIT_CODE -ne 0 ]; then \
68+
echo "ERROR: mutant run failed with exit code $$MUTANT_EXIT_CODE"; \
69+
exit $$MUTANT_EXIT_CODE; \
70+
fi; \
6671
fi; \
6772
rm -f .all_files.tmp .node_files.tmp
6873
else
69-
# --- Local Execution ---
7074
@echo "Running mutation tests locally for rails_application (mutant discovers subjects from .mutant.yml)"
7175
@RAILS_ENV=test bundle exec mutant run
7276
endif

0 commit comments

Comments
 (0)