about summary refs log tree commit diff
path: root/nixos/lib/testing.nix
Commit message (Collapse)AuthorAge
* Use only one build of qemu in VM testsEelco Dolstra2016-12-20
| | | | | | | Previously we were using two or three (qemu_kvm, qemu_test, and qemu_test with a different dbus when minimal.nix is included). (cherry picked from commit 8bfa4ce82ea7d23a1d4c6073bcc044e6bf9c4dbe)
* virtualisation.qemu.program: RemoveEelco Dolstra2016-12-20
| | | | | | | | This option is defined in qemu-vm.nix, but that module is not always imported. http://hydra.nixos.org/build/44817443 (cherry picked from commit 03c55005dfd6fbcd5cf8e00128a3bb6336b3bc0f)
* tesseract: 3.02.02 -> 3.04.01aszlig2016-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the upstream changelog: * Tesseract development is now done with Git and hosted at github.com (Previously we used Subversion as a VCS and code.google.com for hosting). So let's move over to the GitHub repository, where the organisation also includes a full repository for tessdata, so we no longer need to fetch it one-by-one. The build also got significantly simpler, because we no longer need to run autoconf, neither do we need to patch the configure script for Leptonica headers. This also has the advantage that we don't need to use the enableLanguages attribute for the test runner anymore. Full upstream changelog can be found at: https://github.com/tesseract-ocr/tesseract/blob/c4d273d33cc36e/ChangeLog Tested against all NixOS tests with enabled OCR (chromium, emacs-daemon, installer.luksroot and lightdm). Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @viric
* nixos/lib/testing: Fix unsetting $xchgaszlig2016-09-11
| | | | | | | | | | | | Regression introduced by 4dcb685af940efd74a7b2b66ae917129ef232d83. Unsetting the environment variable shortly before using it is not going to end up very well, so let's just filter out the variable from the output of export and unset it shortly afterwards. This fixes the runInMachine NixOS test. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* runInMachine: Unset another variableEelco Dolstra2016-09-09
| | | | Thanks @cstrahan.
* runInMachine: Support passAsFileEelco Dolstra2016-09-08
| | | | | We need to rewrite attributes passed via files to their location in /tmp/xchg in the VM. Otherwise functions like runCommand don't work.
* treewide: Use more makeBinPathTuomas Tynkkynen2016-08-23
|
* make-wrapper: fixup #14753 changes to make tests workVladimír Čunát2016-06-19
| | | | | | | The tests need to expand passed variable and very carefully. I could see no other easy way than to change single-quoting in makeWrapper to double-quoting. The tests now fail with the same problem as on master...
* nixos/lib/testing.nix: make 'config' a free variableDomen Kožar2016-03-29
| | | | cc @edolstra
* Prefer local build for the test driver scriptEelco Dolstra2015-08-26
|
* Let's not have a package named "lib"Eelco Dolstra2015-08-11
| | | | | | See https://github.com/NixOS/nixpkgs/commit/fb24c7c95b586678c2b65e6751a7797844c44e28. The "_" suffix follows the convention of the "if" package.
* nixos/testing: Don't shadow "lib" in makePerlPath.aszlig2015-08-11
| | | | | | | | | | | | | | | | Regression introduced by 032f0ffdd03fa4d836825bcbb7e89f1abcf7e57f. The change doesn't look obvious at the first sight why it may cause problems with lib.makePerlPath, but it introduces a Perl package called "lib". And using "with perlPackages;" uses the Perl library "lib" instead of the lib attribute set from pkgs. So let's use pkgs.lib.makePerlPath directly in hope that there won't be a Perl package anytime soon which is called "pkgs". Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* all tests: added meta.maintainers sectionJoachim Schiele2015-07-12
|
* nixos/testing: Use stripped down tesseract only.aszlig2015-05-22
| | | | | | | Only include the English language for the VM tests, because we most likely won't need other languages. At least for now. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* nixos/test-driver: Make tesseract OCR optional.aszlig2015-05-22
| | | | | | | | | | | | | | | | | 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>
* nixos/test-driver: Add new getScreenText function.aszlig2015-05-21
| | | | | | | | | | | | | | | | | | | | | Basically, this creates a screenshot and throws tesseract at it to recognize the characters from the screenshot. In order to produce a result that is well enough, we're using lanczos scaling and scale the image up to 400% of its original size. This provides the base functionality for a new Machine method which will be called waitForText. I originally had that idea long ago when writing the VM tests for VirtualBox and Chromium, but thought it would be disproportionate to the case. The downside however is that VM tests now depend on tesseract, but given the average runtime of our tests it really shouldn't have a too big impact and it's only a runtime dependency after all. Another issue is that the OCR process takes quite some time to finish, but IMHO it's better (as in more deterministic) than to rely on sleep(). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* VM tests: Don't produce output on failureEelco Dolstra2015-04-10
| | | | | Producing output makes it hard to restart builds that failed for intermittent reasons (like timeouts). So let's not do that.
* test-driver: Use netpbm instead of imagemagickEelco Dolstra2014-09-25
| | | | Imagemagick pulls in 100s of megabytes of dependencies.
* nixos/test-reports: use local copy of jqueryBjørn Forsman2014-09-07
| | | | | | | | | | | | | | The current way test reports get jquery, src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" only works when getting reports over http:// or https://, not file://. Change it so that it works for all protocols by using a local copy of jquery. This fixes the issue where locally created and browsed test reports cannot be navigated properly; clicking the '+' symbol to expand sub-sections doesn't work.
* makeTest: Pass nodes attributeEelco Dolstra2014-07-30
| | | | | | This allows doing things like: nix-build nixos/tests/misc.nix -A nodes.machine.config.system.build.initialRamdisk
* support for nixos test namesFlorian Friesdorf2014-06-28
|
* Fix simpleTest functionEelco Dolstra2014-04-24
|
* Simplify running tests even furtherEelco Dolstra2014-04-14
| | | | | | | | | | | Now you can just say: $ nix-build '<nixos/tests/login.nix>' You can still get the driver script for interactive testing: $ nix-build '<nixos/tests/login.nix>' -A driver $ ./result/bin/nixos-test-driver
* Make it easier to run the testsEelco Dolstra2014-04-14
| | | | | | | | | | | You can now run a test in the nixos/tests directory directly using nix-build, e.g. $ nix-build '<nixos/tests/login.nix>' -A test This gets rid of having to add the test to nixos/tests/default.nix. (Of course, you still need to add it to nixos/release.nix if you want Hydra to run the test.)
* Move generation of coverage reports from nixos/lib/testing to releaseToolsEelco Dolstra2014-03-03
| | | | Also, turn some stdenv adapters into setup hooks.
* Fix runInMachineEelco Dolstra2013-10-16
| | | | | | | | It requires a writable /nix/store to store the build result. Also, wait until we've reached multi-user.target before doing the build, and do a sync at the end to ensure all data to $out is properly written. http://hydra.nixos.org/build/6496716
* Move all of NixOS to nixos/ in preparation of the repository mergeEelco Dolstra2013-10-10