tests: improve env tests and move to tests dir

This commit is contained in:
Sander 2025-09-21 17:20:39 +02:00
parent d487f94a7a
commit 7449e8905b
No known key found for this signature in database
3 changed files with 12 additions and 8 deletions

View file

@ -1,18 +0,0 @@
# Realizes <num>> of derivations with size of <size>MB
{ size ? 1 # MB
, num ? 10 # count
, currentTime ? builtins.currentTime
, noChroot ? false
}:
with import <nixpkgs> {};
let
drv = i: runCommand "${toString currentTime}-${toString i}" {
__noChroot = noChroot;
} ''
dd if=/dev/zero of=$out bs=${toString size}MB count=1
'';
in writeText "empty-${toString num}-${toString size}MB" ''
${lib.concatMapStringsSep "" drv (lib.range 1 num)}
''