Skip to content

add a simulation mode based on the fixture pool

Harald Sitter requested to merge work/simulate into master

it's very tricky to actively test the UI because you can't just inject arbitrary SMART data blobs.

this refactor seeks to remedy that by abstracting away the device notification from solid and based on that implement a complete simulation mode where both the device notifier (the bit enumerating solid) and the ctl (the bit doing kauth + smartctl) are replaced by mocking instances at runtime. these instances then use the data in the fixture pool instead of actually looking at the active hardware on the system. this effectively allows us to check how all the various fixtures are actually handled by the actual production code.

for convenience more than anything this is on by default when building in debug mode. also for convenience the fixtures are rcc'd into the binary instead of looked up from disk (also relocatability is of course always a concern)

(this actually reveals a problem with the notification tech: it doesn't notify on devices that are failing right out the gate since a fix that changed how devices are added to the monitor :()

Merge request reports