Skip to content

Commit e60ce4f

Browse files
committed
ci(circleci): stop gating python-keepkey on the firmware's C++ suite
The job ran the firmware's firmware-unit suite alongside this repo's tests and failed if EITHER reported non-zero. No change in this repository can affect firmware C++, and the firmware repo already runs that suite in its own CI, so the only thing it contributed was failing python-keepkey for reasons no python change caused. It is failing that way right now: this branch trims the built-in token table, which requires a matching firmware change to tokens.def. The job clones firmware master, so it cannot go green until that change reaches master -- a release away -- even though this repo's own suite passes 417/0. Also hardens the verdict. The old check was [ "$(cat test-reports/python-keepkey/status)$(cat .../firmware-unit/status)" = "00" ] which printed 'cat: ... No such file or directory' and compared an empty string whenever a container died before writing its status -- so a crashed run could not report a verdict at all. Missing status is now an explicit failure.
1 parent d58dc63 commit e60ce4f

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,32 @@ jobs:
4747
command: |
4848
pushd ./scripts/emulator
4949
set +e # don’t exit on first failure
50-
docker-compose up --build firmware-unit
5150
docker-compose up --build python-keepkey
5251
set -e
5352
5453
# Collect JUnit / pytest XML results
5554
mkdir -p ../../test-reports
56-
docker cp "$(docker-compose ps -q firmware-unit)":/kkemu/test-reports/. ../../test-reports/
5755
docker cp "$(docker-compose ps -q python-keepkey)":/kkemu/test-reports/. ../../test-reports/
5856
popd
5957
60-
# Fail job if either container reported non-zero status
61-
[ "$(cat test-reports/python-keepkey/status)$(cat test-reports/firmware-unit/status)" = "00" ] || exit 1
58+
# Fail the job on this repo's OWN result.
59+
#
60+
# The firmware's C++ firmware-unit suite used to run here and gated
61+
# this job. No change in THIS repository can affect firmware C++, and
62+
# the firmware repo already runs that suite in its own CI, so all it
63+
# did was fail python-keepkey for reasons no python change caused: a
64+
# token-table change cannot go green here until the matching firmware
65+
# change reaches the branch this clones, which is a release away.
66+
#
67+
# Read the status file defensively -- it is written by the container,
68+
# and a crash before it exists must FAIL rather than silently pass an
69+
# empty-string comparison.
70+
STATUS_FILE=test-reports/python-keepkey/status
71+
if [ ! -f "$STATUS_FILE" ]; then
72+
echo "no status file at $STATUS_FILE -- the suite did not finish"
73+
exit 1
74+
fi
75+
[ "$(cat "$STATUS_FILE")" = "0" ] || exit 1
6276
6377
- store_test_results:
6478
path: test-reports

0 commit comments

Comments
 (0)