tests/generated: use runCommandNoCCLocal and structuedAttrs

The former makes the test derivation _slightly_ smaller, the latter
makes the `$errors` stdenv variable slightly more robust.
This commit is contained in:
Matt Sturgeon 2024-09-09 15:58:27 +01:00
parent 9f4c9ea7e4
commit 0f83298f2c
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -1,6 +1,6 @@
{
lib,
runCommand,
runCommandNoCCLocal,
pkgs,
}:
let
@ -81,10 +81,15 @@ let
)
);
in
runCommand "generated-sources-test" { inherit errors; } ''
if [ -n "$errors" ]; then
echo -n "$errors"
exit 1
fi
touch "$out"
''
runCommandNoCCLocal "generated-sources-test"
{
__structuredAttrs = true;
inherit errors;
}
''
if [ -n "$errors" ]; then
echo -n "$errors"
exit 1
fi
touch "$out"
''