mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-24 14:19:12 +01:00
test: scenario tests that run the simulator and check a vehicle's physicslog
tests/scenarios/run.py builds a test scenery from a game install's scenery (own trainsets removed, case fragment added), runs eu07 in ghostview with physicslog on, and checks what the vehicle did: starts, max speed, brakes, stops. First case: EU07 on td.scn driven by AI on the td/rozklad timetable, with the Stacja1 exit route set by an event launcher instead of shift+4. eu07 gets a -ini <file> option: an extra settings file read after eu07.ini, so a test run can switch to a window and turn on physicslog without touching the user's config. Local only: scenery and vehicle data are not in the repo.
This commit is contained in:
11
tests/scenarios/cases/eu07_td_timetable.scn
Normal file
11
tests/scenarios/cases/eu07_td_timetable.scn
Normal file
@@ -0,0 +1,11 @@
|
||||
// added by tests/scenarios/run.py to the base scenery, whose own trainsets were removed:
|
||||
// the trainset goes after FirstInit, the launcher before it.
|
||||
// the EU07 stands where td.scn keeps its timetable train and gets the same timetable.
|
||||
trainset td/rozklad tdo_n1734 0.0 0.1
|
||||
node -1 0 autotest_eu07 dynamic pkp\4e_v1 4e-004 4e 0 headdriver 0 0 enddynamic
|
||||
endtrainset
|
||||
|
||||
// td.scn sets routes from the keyboard (shift+1..4 run events keyctrl01..04). keyctrl04 is the
|
||||
// way out of the track the train stands on: switch zwr02 and the exit signal stacja1_j at 40.
|
||||
// a launcher with a positive time fires once at that hour (HHMM), radius -1 means anywhere.
|
||||
node -1 0 autotest_route eventlauncher 0 0 0 -1 none 1034 keyctrl04 end
|
||||
Reference in New Issue
Block a user