From 264e10480b2f19533102ef1cce796cb3cd89e518 Mon Sep 17 00:00:00 2001 From: Benedikt Schesch Date: Sun, 5 May 2024 12:28:15 -0700 Subject: [PATCH] Crash script when one run fails --- Makefile | 6 ++++-- src/python/replay_merge.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 29afeb9505..ece2e8d9a4 100644 --- a/Makefile +++ b/Makefile @@ -133,9 +133,11 @@ clean-local: check-merges-reproducibility: @echo "Running replay_merge for each idx in parallel..." - @tail -n +2 $(CSV_RESULTS) | awk -F, '{print $$1}' | while read idx; do \ - python3 src/python/replay_merge.py --merges_csv $(CSV_RESULTS) -delete_workdir --idx $$idx; \ + @set -e; \ + tail -n +2 $(CSV_RESULTS) | awk -F, '{print $$1}' | while read idx; do \ + python3 src/python/replay_merge.py --merges_csv $$(CSV_RESULTS) --delete_workdir --idx $$idx; \ done + protect-repos: find repos -mindepth 1 -type d -exec chmod a-w {} + diff --git a/src/python/replay_merge.py b/src/python/replay_merge.py index c7352e44b3..6c5ce28053 100755 --- a/src/python/replay_merge.py +++ b/src/python/replay_merge.py @@ -20,6 +20,7 @@ from loguru import logger logger.add("replay_merge.log", mode="a") +logger.add(sys.stdout, colorize=True) # pylint: disable=too-many-arguments, too-many-locals