mirror of
https://gitlab.com/TECHNOFAB/nixtest.git
synced 2025-12-12 02:00:18 +01:00
feat: add "script" test type
This commit is contained in:
parent
d0e47e305d
commit
b50a1c61a6
3 changed files with 59 additions and 2 deletions
|
|
@ -12,6 +12,7 @@
|
|||
expected ? null,
|
||||
actual ? null,
|
||||
actualDrv ? null,
|
||||
script ? null,
|
||||
pos ? null,
|
||||
}: let
|
||||
fileRelative = lib.removePrefix ((toString self) + "/") pos.file;
|
||||
|
|
@ -29,6 +30,10 @@
|
|||
expected = expected';
|
||||
# discard string context, otherwise it's being built instantly which we don't want
|
||||
actualDrv = builtins.unsafeDiscardStringContext (actualDrv.drvPath or "");
|
||||
script =
|
||||
if script != null
|
||||
then builtins.unsafeDiscardStringContext (pkgs.writeShellScript "nixtest-${name}" script).drvPath
|
||||
else null;
|
||||
pos =
|
||||
if pos == null
|
||||
then ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue