From 8be00dc71dbe409447feddc42d26bdfaf38703a4 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 22 May 2015 07:14:00 +0200 Subject: 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 --- nixos/tests/installer.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos/tests/installer.nix') 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/); -- cgit 1.4.1