diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-05-22 07:14:00 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-05-22 07:21:58 +0200 |
commit | 8be00dc71dbe409447feddc42d26bdfaf38703a4 (patch) | |
tree | ed1958593655e40907c4bd17232bae98c3a50ecc /nixos/tests/installer.nix | |
parent | efd4fcbebc09d2c40713913de40786d8cb31ed9c (diff) | |
download | nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar.gz nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar.bz2 nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar.lz nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar.xz nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.tar.zst nixlib-8be00dc71dbe409447feddc42d26bdfaf38703a4.zip |
nixos/test-driver: Make tesseract OCR optional.
By default this is now enabled, and it has to be explicitely enabled using "enableOCR = true". If it is set to false, any usage of getScreenText or waitForText will fail with an error suggesting to pass enableOCR. This should get rid of the rather large dependency on tesseract which we don't need for most tests. Note, that I'm using system("type -P") here to check whether tesseract is in PATH. I know it's a bashism but we already have other bashisms within the test scripts and we also run it with bash, so IMHO it's not a problem here. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r-- | nixos/tests/installer.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index f491b0460330..64f98141cc0e 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -252,12 +252,13 @@ let makeInstallerTest = name: { createPartitions, preBootCommands ? "", extraConfig ? "" , testChannel ? false, grubVersion ? 2, grubDevice ? "/dev/vda" - , grubIdentifier ? "uuid" + , grubIdentifier ? "uuid", enableOCR ? false }: makeTest { inherit iso; name = "installer-" + name; nodes = if testChannel then { inherit webserver; } else { }; + inherit enableOCR; testScript = testScriptFun { inherit createPartitions preBootCommands testChannel grubVersion grubDevice grubIdentifier extraConfig; @@ -364,6 +365,7 @@ in { preLVM = true; }; ''; + enableOCR = true; preBootCommands = '' $machine->start; $machine->waitForText(qr/Enter passphrase/); |