3
0
Fork 0
forked from mirrors/nixpkgs

tests.pkgs-lib.formats: Allow strings with context in test runner

This commit is contained in:
Robert Hensing 2022-04-04 14:08:21 +02:00
parent 08660ae7c5
commit 46156529f2

View file

@ -18,8 +18,11 @@ let
}) [ def ]);
in formatSet.generate "test-format-file" config;
runBuildTest = name: { drv, expected }: pkgs.runCommand name {} ''
if diff -u '${builtins.toFile "expected" expected}' '${drv}'; then
runBuildTest = name: { drv, expected }: pkgs.runCommand name {
passAsFile = ["expected"];
inherit expected drv;
} ''
if diff -u "$expectedPath" "$drv"; then
touch "$out"
else
echo