dev/tests: add --attr option to print full attrpath of tests

Allows using the `tests` devshell command to discover the full attrpath
of a test.

e.g.

```
$ tests --attr modules-lsp plugins-by-name-lazygit
Printing 2 tests: modules-lsp plugins-by-name-lazygit

Full attr paths:
- checks.x86_64-linux.test-2.entries.modules-lsp
- checks.x86_64-linux.test-18.entries.plugins-by-name-lazygit
```
This commit is contained in:
Matt Sturgeon 2025-05-16 05:12:26 +01:00
parent f4a7447d27
commit 14c7f5f896
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 21 additions and 5 deletions

View file

@ -61,8 +61,8 @@
checkName:
map (testName: {
name = testName;
value = "${checkName}.passthru.entries.${testName}";
}) (builtins.attrNames checks'.${checkName}.passthru.entries)
value = "${checkName}.entries.${testName}";
}) (builtins.attrNames checks'.${checkName}.entries)
) names
);
in