Both waited for every vehicle of the scenery to stand still, so on a scenery
with AI traffic a test could pass only when the traffic happened to stand too,
and the standstill end hardly ever came.
A test scenery names the train under test with test.vehicle <name> in its
config block (once for each train, if several): the pass and the standstill wait
for the consists of these vehicles as they are at the moment, so a train the
tested one couples to counts with it. A name the scenery doesn't have ends the
test with the error code. Without test.vehicle every vehicle counts, as before.
A signal passed at danger counts for every train either way.
run.py puts the case's lead vehicle into test.vehicle. test_mode_standstill_traffic
has the train under test standing on track 2 of Stacja1 while AI traffic leaves
track 1 on the timetable: it ends on its 100 s standstill, where counting every
vehicle runs into the 300 s timeout. Physicslogs of the other trains of a case
(<something>_<vehicle>) are moved out of the game dir too.
A test run that hung, in the loading or anywhere else, waited until whoever
started it killed it. A watchdog thread now ends a run still going test.wall_timeout
seconds of real time after the start of the simulator, loading included: it says
`test: timeout ... still running after N s of real time` and quits with the
timeout code, whatever the main thread is doing, with no dialog. A test that has
ended but whose simulator doesn't close ends with its own result.
The limit is test.wall_timeout (settings, the scenery's config block) or
--test-wall-timeout, which wins. Not given, it is test.timeout + 600 s: ten
minutes for the loading, and a simulation that runs at least as fast as real
time is never cut short. test.timeout 0 means no watchdog unless the limit is
given; test.wall_timeout 0 turns it off.
run.py passes the case's timeout as --test-wall-timeout and kills a simulator
only 30 s after it. A timeout from the watchdog counts as wall_timeout there, so
a run that hung doesn't pass a case expecting the simulation time to run out;
test_mode_wall_timeout ends while loading on a limit of 2 s.
- TController::TableCheck() calls TSpeedPos::Update() as it did before the
test mode: the check for a signal passed at danger is a call of its own
after it (CheckSignalPassedAtDanger), so the update lines nest no deeper
than on master (S134). A switch is a track, so a signal's update never
takes the switch-change branch and the check runs in the same place as
before; the physicslogs of all 15 scenario cases are byte for byte the
same.
- null_imgui_renderer is final (S1235), to_string(test_result) uses
`using enum` (S6177), init_result_cell() is const (S5817),
ConfigParseTest() takes a std::string_view (S6009) and the test settings
struct is declared apart from its member (S3646).
An electric and a diesel locomotive got their control coupled whenever the
scenario (and so the Starter) asked for it, since the scenery coupling ignores
ControlType, or when neither coupler named a control system, so a Vectron and
an SM42 ran in multiple unit.
TMoverParameters::Attach() now leaves the control connection out between an
electric (ElectricSeriesMotor, ElectricInductionMotor) and a diesel
(DieselEngine, DieselElectric/DumbDE) traction vehicle, for the scenery, the
AI, the coupling keys and the automatic couplers alike, and logs it. Vehicles
without own traction (cars, control trailers) are not affected, nor are
permanent couplings within a unit, nor couplers that both name the same
ControlType, which stays the vehicle authors' way to allow such a pair. The
AI coupling order expects the coupling the vehicles can take, so it doesn't
wait for the control connection forever.
Existing scenarios coupling such a pair still load, without the control
connection. "controlcoupling.enginecheck no" in eu07.ini turns the check off.
No SVN data change is needed. (eu07/maszyna#520)
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.
eu07 --test -s <scenery> [--test-timeout <s>] runs the scenery in ghostview with
the null renderer (models loaded, no textures), a hidden window, no sound,
network or python, and in fixed steps of 0.03 s of simulation time per frame
(three 10 ms physics steps) as fast as it can. Without -seed it uses a fixed
seed, so two runs give byte-identical physicslogs.
The scenery reports its result to the __test.result memory cell, which the
simulator always creates: value 1 passes once every vehicle has stood still for
1 s, value 0 fails at once. The run ends with exit code
0 pass, 1 fail,
2 a train passed a signal at stop (SetVelocity 0 0, as seen in its driver's
speed table; SetVelocity 0 x on automatic block doesn't count),
3 timeout (test.timeout, default 3600 s of simulation time),
4 standstill (every vehicle still for test.standstill s, default 300, with no
result; a pass with test.pass_on_standstill yes),
5 error (no -s, the scenery didn't load or has no vehicles, an exception).
The test.* keys go in the scenery's config block; test.fail_if_stop_overran no
only logs a signal passed at danger. Outside the test mode a signal passed at
danger is logged.
The null renderer gets a ui backend which draws nothing, hands out the null
texture and material instead of throwing, and ends the ui frame. A GL context
is still made for the hidden window, without asking for a version, as parts
of the ui create textures with gl calls of their own. No crash dialog or
message box in test mode; the window code no longer needs a monitor.
- In the top view of the tracks work area, the renderer's reach is the half diagonal of the screen. It used to be three extents, which cut wide windows short.
- Cells far from the camera no longer draw only their tracks: the terrain shapes are drawn too. Models keep their own ranges.
- In that view, the heightmap streamer loads chunks as far as the corners, up to 50 km. The detail comes from the size of a pixel, not from the distance.
- The walk over the chunks around the camera is skipped while it would ask for nothing, so a wide reach costs little.
- A setting, kept in the editor settings, leaves out the ballast of the railway in the top view, so the ground under the tracks shows. It is in the View menu and next to the extent slider.
- Self-test: ortho <extent> [noballast|ballast], orthophoto off.