f73bdd1c

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Split the vm selftest into one derivation per example

It was one Haskell suite booting nine emulated routers one after
another, 362 seconds on a machine that can run all nine at once. Each
example is now its own derivation, so nix builds them together, an
example that has not changed is not booted again, and a failure has a
log of its own rather than a line in a three-thousand line build log.
Six minutes to four and a half.

VmSpec is gone, but nothing it asserted is: a valid example becomes
vmtestCheckFor, which is the derivation that already meant "RouterOS
accepted this"; an example that documents its refusal becomes
vmtestRefusalFor, new here, which asserts both that the router refused
it and that it refused it for the documented reason; and the assertion
that the cheap check does not already catch it becomes checkedFor.
Tried out both ways: a configuration RouterOS refuses fails
vmtestCheckFor, and a documented reason no router would give fails
vmtestRefusalFor.

The five tool tests stay one suite. They hold a router open while a
separate process drives it over ssh, and they are now what the wall
clock is: about four minutes of the four and a half.
hopinionpre-commitreleaserouteros-checkshellconfiguredevShelldefaultrouteros-checkrouteros-vmtest-selftestx86_64-linux