Drop support for old test-driver

This commit is contained in:
r-vdp 2024-01-08 12:10:30 +01:00
parent a8db3b881b
commit 107ed51c8e
No known key found for this signature in database
2 changed files with 1 additions and 105 deletions

View file

@ -313,28 +313,7 @@ in
]};
'';
test-driver =
let
upstream = hostPkgs.callPackage "${nixpkgs}/nixos/lib/test-driver" { };
in
upstream.overrideAttrs (_: {
# Try to apply the patch for backwards compat.
# It is included upstream starting from NixOS 23.05.
# github.com/NixOS/nixpkgs#228220
postPatch =
let
patch = "${lib.getBin hostPkgs.patch}/bin/patch";
patchFile = ../test/0001-nixos-test-driver-include-a-timeout-for-the-recv-cal.patch;
in
''
echo "Try to apply patch ${patchFile}..."
if grep --quiet --fixed-strings "bash" test_driver/machine.py; then
echo "Patch already present, ignoring..."
else
${patch} -p1 < ${patchFile}
fi
'';
});
test-driver = hostPkgs.callPackage "${nixpkgs}/nixos/lib/test-driver" { };
runTest = { nodes, vlans, testScript, extraDriverArgs }: ''
${lib.getBin test-driver}/bin/nixos-test-driver \