mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 15:45:23 +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.
40 lines
1.3 KiB
JSON
40 lines
1.3 KiB
JSON
{
|
|
"description": "EU07 pushing three coaches on td.scn with slippery rail and no route set, starting at 30 km/h: brakes for the exit signal at stop and skids. Pushed by the train it doesn't roll back at the stop, so it used to stay skidding on locked wheels with the brakes capped by the sliding adhesion and creep (eu07/maszyna#479).",
|
|
"base_scenery": "td.scn",
|
|
"time": "10:34",
|
|
"track_friction": 0.03,
|
|
"fragment": "td_red_signal_moving.scn",
|
|
"test_config": [
|
|
"test.fail_if_stop_overran no"
|
|
],
|
|
"vars": {
|
|
"velocity": "30",
|
|
"consist": [
|
|
"node -1 0 {{vehicle}}_w1 dynamic pkp\\bdhpumn_v3 bdhpumn_50512608068-6 BDHPUMN_TAPICERKA_1 0 nobody 115 0 enddynamic",
|
|
"node -1 0 {{vehicle}}_w2 dynamic pkp\\bdhpumn_v3 bdhpumn_50512608011-6 BDHPUMN_NG_1 0 nobody 115 0 enddynamic",
|
|
"node -1 0 {{vehicle}}_w3 dynamic pkp\\bdhpumn_v3 bdhpumn_50512608068-6 BDHPUMN_TAPICERKA_1 0 nobody 115 0 enddynamic",
|
|
"node -1 0 {{vehicle}} dynamic pkp\\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic"
|
|
]
|
|
},
|
|
"duration": 240,
|
|
"timeout": 900,
|
|
"checks": [
|
|
{
|
|
"type": "slips",
|
|
"within": 60
|
|
},
|
|
{
|
|
"type": "slip_clears",
|
|
"moving_speed": 5,
|
|
"stop_speed": 0.05,
|
|
"within": 5
|
|
},
|
|
{
|
|
"type": "holds_still",
|
|
"moving_speed": 5,
|
|
"stop_speed": 0.05,
|
|
"max_distance": 0.01
|
|
}
|
|
]
|
|
}
|