18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-28 19:44:07 +01:00

test(scenarios): cases from the reports eu07/maszyna#421, #506, #524, #525

Six slow cases, each a mission of a scenery of the game with every train driven by AI:
- wrzosy_pxe336080_couples (#524): the locomotive, given the orders the player's hands stand
  for, couples to the rake in the Wolica depot and takes it out. Passes.
- baltyk_skm1_roj55324_shunting_signal, baltyk_skm1_roj55321_departure (#525): the unit on the
  siding gets its shunting signal once the shunter beside it has moved, the one in the platform
  leaves on time. Pass, with 4 and 3 seeds.
- l053_poranek_tme222158_debica (#421): xfail, the train is never let into Debica: the AI of
  another locomotive passes the shunting signal Tm4 at stop and the station waits for it for good.
- l053_poranek_tme222158_debica_et21 (#421, with the ET21 of the report): xfail, the ET21 stops
  past the end of the overhead wire at Debica Towarowa and its driver never restarts it.
- l053_poludnie_roj32134_debica (#506): both trains of the mission run and end at Debica. Passes.
This commit is contained in:
jerrrrycho
2026-11-12 04:47:03 +01:00
parent 633b97d21c
commit ca23831bb2
8 changed files with 206 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
{
"description": "eu07/maszyna#525, Baltyk skm1, the mission that starts in the platform of Baltyk Glowny (EN71-014ra, ROJ55321, departure 10:34): the exit signal has to clear and the unit has to leave. Standing for 10 minutes ends the test as standstill.",
"base_scenery": "baltyk_skm1.scn",
"strip_trainsets": false,
"vehicle": "EN71-014ra",
"slow": true,
"physicslog": false,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.standstill 600",
"test.fail_if_stop_overran no"
],
"duration": 900,
"expect": "timeout",
"timeout": 900
}

View File

@@ -0,0 +1,18 @@
{
"description": "eu07/maszyna#525, Baltyk skm1, the mission that starts on the siding of Baltyk Towarowy next to the shunter (EN90-009A, ROJ55324): the station lets the unit into the platforms once its shunter 6Dg-1244, on the track beside it, has done its first moves (4 minutes after the start), and out to Alakowice at 10:42. A shunter that gets stuck leaves the unit at the shunting signal for good: standing for 15 minutes ends the test as standstill.",
"base_scenery": "baltyk_skm1.scn",
"strip_trainsets": false,
"vehicle": "EN90-009A",
"slow": true,
"physicslog": false,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.standstill 900",
"test.fail_if_stop_overran no"
],
"duration": 1800,
"expect": "timeout",
"timeout": 900
}

View File

@@ -0,0 +1,24 @@
{
"description": "eu07/maszyna#506, L053 poludnie, ROJ23133 Debica - Rudawa and ROJ32134 back (EN57-1797ra): the unit runs both trains among the scenery's traffic and ends at Debica (the station's state cell of ROJ32134 says done).",
"base_scenery": "l053_poludnie.scn",
"strip_trainsets": false,
"vehicle": "EN57-1797ra",
"fragment": "mission_state_probe.scn",
"vars": {
"cell": "deb_roj32134_stat",
"state": "d * *",
"reason": "roj32134_ended_at_debica"
},
"slow": true,
"physicslog": false,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.timeout 7200",
"test.standstill 1500",
"test.fail_if_stop_overran no"
],
"expect": "pass",
"timeout": 3600
}

View File

@@ -0,0 +1,31 @@
{
"description": "eu07/maszyna#421, L053 poranek, TME222158: the locomotive brings the wagons with steel coils from Debica Towarowa to Debica, uncouples (Shunt 0 0 from the scenery), shunts on the Ms2 signals while the station's SM42 takes the wagons away, couples to its next train and gets the exit signal to Sandomierz (step 6 of the station's state cell).",
"base_scenery": "l053_poranek.scn",
"strip_trainsets": false,
"vehicle": "ET22-654",
"fragment": "mission_state_probe.scn",
"vars": {
"cell": "deb_tme222158_stat",
"state": "* 6 *",
"reason": "tme222158_got_the_exit_signal_at_debica"
},
"slow": true,
"xfail": "eu07/maszyna#421 is not reached: with every train driven by AI Debica jams 4 minutes after the start, the AI of EP07-338'16 passes the shunting signal Tm4 at stop at 29 km/h and stops 20 m beyond the checkpoint before it (tor1834:event0), so RPE23113 never reports there and TME222158 is never let into the station",
"physicslog": false,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.timeout 6000",
"test.standstill 2100",
"test.fail_if_stop_overran no"
],
"expect": "pass",
"timeout": 3600,
"checks": [
{
"type": "log_contains",
"pattern": "Uncoupling \\[ET22-654\\]: uncoupled"
}
]
}

View File

@@ -0,0 +1,37 @@
{
"description": "eu07/maszyna#421 as reported in 2021, with an ET21 on TME222158 (the scenery has an ET22 there now): the same run as l053_poranek_tme222158_debica, the locomotive of the mission replaced.",
"base_scenery": "l053_poranek.scn",
"strip_trainsets": false,
"replace": [
[
"node -1 0 ET22-654 dynamic pkp\\et22_v3 201E-654 201E -1 headdriver 3 0 enddynamic",
"node -1 0 ET21-367 dynamic pkp\\et21_v2 ET21-367 3e2 -1 headdriver 3 0 enddynamic"
]
],
"vehicle": "ET21-367",
"fragment": "mission_state_probe.scn",
"vars": {
"cell": "deb_tme222158_stat",
"state": "* 6 *",
"reason": "tme222158_got_the_exit_signal_at_debica"
},
"slow": true,
"xfail": "eu07/maszyna#421: the ET21 stands for good at Debica Towarowa with the shunting signal at Ms2. Running round the wagons it stops on the headshunt 20 m past the end of the overhead wire (the wire ends at z 4804 over tor2466, the locomotive stands at z 4786), loses power, and its driver never gets out of Prepare_engine; the ET22 the scenery has there now gets through",
"physicslog": false,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.timeout 6000",
"test.standstill 2100",
"test.fail_if_stop_overran no"
],
"expect": "pass",
"timeout": 3600,
"checks": [
{
"type": "log_contains",
"pattern": "Uncoupling \\[ET21-367\\]: uncoupled"
}
]
}

View File

@@ -0,0 +1,13 @@
// added by tests/scenarios/run.py to a scenery that keeps its own trainsets (strip_trainsets false): the
// case tests one of the scenery's missions, with every train driven by AI.
// the sceneries of this kind steer their stations with state cells, one per train (text and two values,
// e.g. "a 6 *": the route of step 6 is set for the train, "d * *": the train is done at this station).
// the probe looks at the cell {{cell}} every 5 s from the start on and reports the pass once it holds
// {{state}}. no fail event: a train that never gets there ends the test with the standstill or the
// timeout of the test mode.
// the two events calling each other are the loop these sceneries use themselves (e.g. bal_obsluga_stacji);
// an event with "onstart" in its name is queued when the scenery starts.
event onstart_autotest_probe multiple 30 none autotest_probe endevent
event autotest_probe multiple 0 {{cell}} autotest_pass else autotest_probe_wait condition memcompare {{state}} endevent
event autotest_probe_wait multiple 5 none autotest_probe endevent
event autotest_pass UpdateValues 0 __test.result {{reason}} 1 * endevent

View File

@@ -0,0 +1,39 @@
// added by tests/scenarios/run.py to wrzosy_pxe336080.scn, which keeps its own trainsets: the mission of
// eu07/maszyna#524. EU07-234 runs light from final_2t839 through the Wolica depot to the rake of 12 coaches
// pxe_1 .. pxe_12 (linia053_wrzosy/pxe336080_dekoracje.scm, "trainset none woa_odst009 304 0"), has to
// couple to it and take it out of the depot.
//
// the scenery gives the locomotive no order at all: its trainset has velocity 0, so with nobody in the cab
// its driver sleeps in Wait_for_orders, and nothing in the scenery tells it to couple, the player does that
// by hand. the two orders the player's hands stand for are given here.
//
// 1. a minute after the start (the scenery sets the way and the shunting signals at 50-55 s): shunt, as
// the signals say (Shunt -1 0). PutValues goes to the vehicle that set the event off, so it hangs on
// event0 of the track the locomotive stands on (the three its 16 m may reach); event0 comes again and
// again while it stands there, the cell lets the order through once.
// the first order is not the one to couple, on purpose: a driver whose first order is Connect never
// releases the hand brake the locomotive starts with, and pulls against it for good (CheckVehicles()
// leaves AutoRewident() out for Connect).
node -1 0 autotest_ordered memcell 0 0 0 ordered 0 0 none endmemcell
event final_2t838:event0 multiple 60 autotest_ordered autotest_order autotest_order_given condition memcompare * 0 * endevent
event final_2t839:event0 multiple 60 autotest_ordered autotest_order autotest_order_given condition memcompare * 0 * endevent
event final_2t840:event0 multiple 60 autotest_ordered autotest_order autotest_order_given condition memcompare * 0 * endevent
event autotest_order PutValues 0 none 0 0 0 Shunt -1 0 endevent
event autotest_order_given UpdateValues 0 autotest_ordered * 1 * endevent
// 2. on the last track before the rake, in the direction the locomotive comes from (event2 of
// woa_lokom007, some 35-45 m short of the first coach): couple to the consist standing ahead with the
// coupler and the brake hose (3), turn round and wait for the shunting signal. it is the order these
// sceneries give their AI shunters (dos_sm42_przypnij).
event woa_lokom007:event2 PutValues 0 none 0 0 0 Shunt -2 -3 endevent
// 330 s after the locomotive ran over lok_woa005 towards the rake the scenery sets the way out
// (lok_woa005:event2 -> PXE_gotowy -> pxe_manewry_ruszaj), coupled or not. it leads back over lok_woa005,
// towards its point 1. every vehicle going that way is counted (eventall1); the locomotive alone makes 1,
// so the second vehicle is a coach of the rake, coupled and pulled. the test ends there, with the train
// still moving (test.no_movement_before_pass no).
node -1 0 autotest_left memcell 0 0 0 left 0 0 none endmemcell
event lok_woa005:eventall1 multiple 0 none autotest_count autotest_judge endevent
event autotest_count AddValues 0 autotest_left * 1 0 endevent
event autotest_judge multiple 0 autotest_left autotest_pass condition memcompare * 2 * endevent
event autotest_pass UpdateValues 0 __test.result the_rake_left_the_depot_behind_the_locomotive 1 * endevent

View File

@@ -0,0 +1,26 @@
{
"description": "eu07/maszyna#524, Wrzosy PXE336080: EU07-234 runs light to the rake of 12 coaches in the Wolica depot, gets the order to couple (the player's hand, the scenery gives none), has to couple to the first coach and leave the depot with the rake behind it.",
"base_scenery": "wrzosy_pxe336080.scn",
"strip_trainsets": false,
"vehicle": "EU07-234",
"fragment": "wrzosy_pxe336080_couple.scn",
"slow": true,
"ini": [
"file.binary.terrain no"
],
"test_config": [
"test.timeout 1800",
"test.standstill 900",
"test.fail_if_stop_overran no",
"test.no_movement_before_pass no"
],
"expect": "pass",
"timeout": 1200,
"checks": [
{
"type": "couples",
"vehicle": "EU07-234",
"other": "pxe_1"
}
]
}