mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
tests.pkgs-lib.formats: Allow strings with context in test runner
This commit is contained in:
parent
08660ae7c5
commit
46156529f2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user