mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
nixos/test-driver: add option to add extra python packages to test code
This commit is contained in:
parent
5862243e1a
commit
a99736e399
2 changed files with 17 additions and 5 deletions
|
@ -52,12 +52,13 @@ rec {
|
|||
, skipLint ? false
|
||||
, passthru ? {}
|
||||
, interactive ? false
|
||||
, extraPythonPackages ? (_ :[])
|
||||
}:
|
||||
let
|
||||
# Reifies and correctly wraps the python test driver for
|
||||
# the respective qemu version and with or without ocr support
|
||||
testDriver = pkgs.callPackage ./test-driver {
|
||||
inherit enableOCR;
|
||||
inherit enableOCR extraPythonPackages;
|
||||
qemu_pkg = qemu_test;
|
||||
imagemagick_light = imagemagick_light.override { inherit libtiff; };
|
||||
tesseract4 = tesseract4.override { enableLanguages = [ "eng" ]; };
|
||||
|
@ -161,6 +162,7 @@ rec {
|
|||
(if meta.description or null != null
|
||||
then builtins.unsafeGetAttrPos "description" meta
|
||||
else builtins.unsafeGetAttrPos "testScript" t)
|
||||
, extraPythonPackages ? (_ : [])
|
||||
} @ t:
|
||||
let
|
||||
mkNodes = qemu_pkg:
|
||||
|
@ -213,13 +215,13 @@ rec {
|
|||
);
|
||||
|
||||
driver = setupDriverForTest {
|
||||
inherit testScript enableOCR skipLint passthru;
|
||||
inherit testScript enableOCR skipLint passthru extraPythonPackages;
|
||||
testName = name;
|
||||
qemu_pkg = pkgs.qemu_test;
|
||||
nodes = mkNodes pkgs.qemu_test;
|
||||
};
|
||||
driverInteractive = setupDriverForTest {
|
||||
inherit testScript enableOCR skipLint passthru;
|
||||
inherit testScript enableOCR skipLint passthru extraPythonPackages;
|
||||
testName = name;
|
||||
qemu_pkg = pkgs.qemu;
|
||||
nodes = mkNodes pkgs.qemu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue