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

feat(simulation): test.no_movement_before_pass, a pass that doesn't wait for a stop

The config key from eu07/maszyna#541. By default (yes) a pass reported to
__test.result waits until every vehicle has stood still for 1 s; with no it
ends the test at once. The key is listed with the other test.* settings in the
log and in the test start line.

Scenario tests: new case test_mode_pass_while_moving reports the pass from
event2 of tor1k as the train runs onto it and checks the run ended with the
train still moving (new check ends_moving). The README lists the test.* keys
with their defaults and the input the test mode ignores.
This commit is contained in:
jerrrrycho
2026-11-07 17:38:38 +01:00
parent dd019d88ba
commit 6ccf4b14bf
6 changed files with 71 additions and 3 deletions

View File

@@ -487,6 +487,12 @@ bool global_settings::ConfigParseTest(cParser& Parser, const std::string& token)
return true;
}
if (token == "test.no_movement_before_pass")
{
ParseOne(Parser, test.no_movement_before_pass);
return true;
}
return false;
}
@@ -1783,6 +1789,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "test.standstill", test.standstill );
export_as_text( Output, "test.pass_on_standstill", test.pass_on_standstill );
export_as_text( Output, "test.fail_if_stop_overran", test.fail_if_stop_overran );
export_as_text( Output, "test.no_movement_before_pass", test.no_movement_before_pass );
export_as_text( Output, "gfx.envmap.enabled", gfx_envmap_enabled );
export_as_text( Output, "gfx.postfx.motionblur.enabled", gfx_postfx_motionblur_enabled );
export_as_text( Output, "gfx.postfx.motionblur.shutter", gfx_postfx_motionblur_shutter );