mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 19:14:59 +01:00
run.py starts eu07 with --test (and --test-timeout <duration> for cases that record a fixed time) and compares the result from the exit code with the case's expect key, before the physicslog checks. The 14 cases take about 30 s with -j 4 instead of minutes. --watch keeps the old windowed run. New case keys: expect, test_config (lines of a config block), track_events (lines added to a track of the base scenery, e.g. event0 test_pass). New cases show each end of the test mode: test_mode_pass, _signal_passed_at_danger, _timeout and _standstill. The slippery rail cases slide past the red signal, which now ends a test, so they set test.fail_if_stop_overran no. README documents the test mode for scenery authors.
9 lines
516 B
Plaintext
9 lines
516 B
Plaintext
// added by tests/scenarios/run.py to td.scn, whose own trainsets were removed.
|
|
// like td_red_signal.scn (no route, the exit signal stacja1_j about 150 m ahead stays at stop),
|
|
// with the test mode's pass event: the case puts it as event0 on tor1k, the track in front of
|
|
// the signal, so it runs once the train stands there. the test passes when every vehicle stopped.
|
|
event test_pass UpdateValues 0 __test.result stopped_before_stacja1_j 1 * endevent
|
|
trainset td/rozklad tdo_n1734 0.0 0.1
|
|
{{consist}}
|
|
endtrainset
|