@@ -55,7 +55,7 @@ rec {
5555
5656 # Run an automated test suite in the given virtual network.
5757 # `driver' is the script that runs the network.
58− runTests = driver:
58+ runTests = { driver, pos }:
5959 stdenv.mkDerivation {
6060 name = "vm-test-run-${driver.testName}";
6161
@@ -69,6 +69,8 @@ rec {
6969 '';
7070
7171 passthru = driver.passthru;
72+
73+ inherit pos;
7274 };
7375
7476
@@ -79,6 +81,11 @@ rec {
7981 # Skip linting (mainly intended for faster dev cycles)
8082 , skipLint ? false
8183 , passthru ? {}
84+ , # For meta.position
85+ pos ? # position used in error messages and for meta.position
86+ (if t.meta.description or null != null
87+ then builtins.unsafeGetAttrPos "description" t.meta
88+ else builtins.unsafeGetAttrPos "testScript" t)
8289 , ...
8390 } @ t:
8491 let
@@ -174,7 +181,7 @@ rec {
174181 driver = mkDriver null;
175182 driverInteractive = mkDriver pkgs.qemu;
176183
177− test = passMeta (runTests driver);
184+ test = passMeta (runTests { inherit driver pos; });
178185
179186 nodeNames = builtins.attrNames driver.nodes;
180187 invalidNodeNames = lib.filter