fix(e2e): rebuild test binaries when restoring non-instrumented build

The post-coverage restore step ran `make clean` (which also wipes
Test/GTest, Test/Integration and Test/Components/*) but only rebuilt
`core apps`, leaving MainGTest.ex/IntegrationTests.ex deleted after
every --cpp-coverage run instead of restored to their plain (non-gcov)
form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino Ferrari
2026-07-01 22:55:48 +02:00
parent 03c7a95e9b
commit 07b6b4898a
+5 -1
View File
@@ -472,7 +472,11 @@ ${PY} "${SCRIPT_DIR}/collect.py" --repo "${REPO_ROOT}" --target "${TARGET}" \
if [ "${CPP_COV}" -eq 1 ]; then
echo " restoring non-instrumented build ..."
make -C "${REPO_ROOT}" -f Makefile.gcc clean >/dev/null 2>&1 || true
make -C "${REPO_ROOT}" -f Makefile.gcc core apps TARGET="${TARGET}" 2>&1 | tail -1
# `clean` also wipes Test/GTest, Test/Integration and Test/Components/* (see
# the root Makefile.gcc `clean` target), so `test` must be rebuilt here too,
# not just `core apps` — otherwise MainGTest.ex/IntegrationTests.ex are left
# deleted (instrumented-only) after every --cpp-coverage run.
make -C "${REPO_ROOT}" -f Makefile.gcc core apps test TARGET="${TARGET}" 2>&1 | tail -1
(cd "${SCRIPT_DIR}/client" && go build -o chain-client . >/dev/null 2>&1) || true
(cd "${SCRIPT_DIR}/debugclient" && go build -o debugclient . >/dev/null 2>&1) || true
fi