18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 18:35:00 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
jerrrrycho
75c8ac6149 test(scenarios): the coupler control case checks that the units coupled
The checks of en57_2000_automatic_coupler_couples said only that nothing
collided nor derailed, so the case passed just as well with the units
buffering, bouncing apart or never meeting.

The simulator writes nothing to the log when automatic couplers catch,
but the black box of the run (physicslog/<scenery>_<date>.blackbox, written
along with the physicslogs the runner turns on) gets a coupling record with
the two vehicles. run.py reads the vehicle and the coupling records of it
and gets a check on them, couples: the two named vehicles couple after the
start and are still coupled at the end. It fails when the black box has no
coupling of that pair, when they came apart again, when they were coupled
from the start, and when the run left no black box.

The case names the vehicles that meet: the last car of the standing unit
and the first of the rolling one. The black box is moved to out/<case>/
with the other files of the run.
2026-11-11 21:25:19 +01:00
jerrrrycho
85119cc110 test(scenarios): automatic coupler cases (#86)
Re-lands #288, which was merged into feat/exe-test-mode after that
branch had already gone to master, so master never got it.

Two EN57-2000 units on td.scn, one standing, the other rolling into it
without a driver. At 50 km/h their automatic couplers mustn't catch: the
log has to show the collision and the derailment. At 4 km/h they couple
and nothing collides. Nothing reports a result, so both cases end on the
60 s test timeout.

run.py gets log_contains / log_lacks checks on the run's log.txt, and an
"ini" case key for extra eu07.ini lines (here crashdamage yes). The log
checks fail when log.txt is missing or empty: with no log text log_lacks
would pass without checking anything.
2026-11-11 11:35:43 +01:00