about summary refs log tree commit diff
path: root/nixos/lib
Commit message (Collapse)AuthorAge
* make-squashfs: Hack to avoid building images where nixos-install won't runTuomas Tynkkynen2017-12-03
| | | | https://github.com/NixOS/nixpkgs/issues/32242
* nixos/qemu: Add virtio-rng-pci to test-driverTuomas Tynkkynen2017-11-26
| | | | Otherwise AArch64 KVM guests don't have enough entropy at boot.
* nixos/testing: fix after --set ceased to evaluate the valueOrivej Desh2017-11-19
|
* make-disk-image: fix evalOrivej Desh2017-11-13
|
* make-disk-image: embed compression switch into the format nameOrivej Desh2017-11-12
|
* make-disk-image: add compressed option to compress qcow2 imagesOrivej Desh2017-11-12
|
* make-disk-image: clean upOrivej Desh2017-11-12
|
* make-disk-image: do not use faketimeOrivej Desh2017-11-11
| | | | | | | Since https://github.com/lkl/linux/pull/394 cptofs preserves the source time, which is 1970-01-01T00:00:01Z for /nix/store and recent for other files. This reverts commit f5b3f2c5a7f2b51e80ac32fb47fd1d7d3e475ad1.
* make-disk-image: clean upOrivej Desh2017-11-11
|
* make-disk-iamge: use faketime to get a consistent timestampDan Peebles2017-11-10
| | | | | | | | | | | | | This fixes #28768 because during an image build, Nix sees bad store timestamps and attempts to fix them, but can't fix them on a running system (due to being inside a builder). Since timestamps on the store are supposed to be 1 anyway, if we fix this, that fixes image building inside booted images made this way. Note that this adds quite a bit of noise to the output, because running `cptofs` under `faketime` causes a bunch of seemingly spurious error messages and my attempts to suppress them all failed. We'll fix it when `cptofs` gets a native timestamp preservation feature.
* Revert "nixos/test-instrumentation: softcode DISPLAY"Joerg Thalheim2017-11-08
| | | | | | | | This reverts commit 4531ec59551fa3f3c9dfb442dff2ec669c467922. This broke waitForX: https://github.com/NixOS/nixpkgs/commit/b11ac5d29dcccdb7474a23ac1d8a6c40553adcd5#commitcomment-25486347 cc @Lassulus
* nixos/test-instrumentation: softcode DISPLAYlassulus2017-11-07
|
* Merge pull request #30166 from LumiGuide/graphite-1.0.2Peter Simons2017-10-18
|\ | | | | Fix graphite crash by upgrading from 0.9.15 -> 1.0.2
| * graphite: 0.9.15 -> 1.0.2Bas van Dijk2017-10-08
| | | | | | | | | | | | | | | | | | | | Fixes: #29961 Also added the option: services.graphite.web.extraConfig for configuring graphite_web.
* | nixos: run parted with --script optionBjørn Forsman2017-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -s, --script: never prompts for user intervention Sometimes the NixOS installer tests fail when they invoke parted, e.g. https://hydra.nixos.org/build/62513826/nixlog/1. But instead of exiting right there, the tests hang until the Nix builder times out (and kills the build). With this change the tests would instead fail immediately, which is preferred. While at it, use "parted --script" treewide, so nobody gets build timeout due to parted error (or misuse). (Only nixos/ use it, and only non-interactive.) A few instances already use the short option "-s", convert them to long option "--short".
* | nixos: Fix output path generation of runInMachineaszlig2017-10-11
|/ | | | | | | | | | | | | | | | | | Regression introduced by a02bb00156086b45e68c1112008db506734f8649. The fix is done by disabling writableStore, because the latter will set up an overlayfs on the Nix store within the VM, which in turn will discard all the outputs of the resulting output path. However in runInMachine we actually *want* the contents of the generated path and also don't want a writable store within the VM (except of course for $out, which is writable anyway). I've added a small regression test to verifify the output in nixos/tests/run-in-machine.nix to make sure this won't break again in the future. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* Deduplicate some filterSource invocationsDan Peebles2017-08-29
| | | | | | | | | This version should have more conventional regexes that work across many platforms and regex engines. This is an issue because up until Nix 1.11, Nix called out to the libc regex matcher, which behaved differently on Darwin and Linux. And in Nix 1.12, we're moving to std::regex which will also behave differently here. And yes, I do actually evaluate make-disk-image.nix on Darwin ;)
* amazon-image: support VPC/VHD as an output format for the builderDan Peebles2017-08-10
|
* make-ext4-fs: Fix modification timestamps in imageTuomas Tynkkynen2017-07-29
| | | | | Use '-f' to make timestamp calls to always return the same time. Also Nix uses the timestamp of '1' instead of epoch directly.
* nixos tests: waitForWindow: output a list of windows we see prior to the ↵Graham Christensen2017-06-20
| | | | | | | | | final check machine: must succeed: xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d' machine: exit status 0 machine: Last chance to match /(?^:dfiirst configuration)/ on the the window list, which currently contains: machine: [i3 con] container around 0xf8a5f0, i3: first configuration, [i3 con] floatingcon around 0xf8c260, [i3 con] container around 0xf8a380, i3bar for output Virtual-1, [i3 con] bottom dockarea Virtual-1, [i3 con] workspace 1, [i3 con] content Virtual-1, [i3 con] top dockarea Virtual-1, [i3 con] output Virtual-1, [i3 con] workspace __i3_scratch, [i3 con] content __i3, [i3 con] pseudo-output __i3, i3
* nixos tests: waitForText: output the detected screen content prior to the ↵Graham Christensen2017-06-20
| | | | | | | | | | | | | | | | | | | last attempt machine: Last chance to match /(?^:BALICE)/ on the screen, which currently contains: machine: performing optical character recognition machine: sending monitor command: screendump /tmp/nix-build-vm-test-run-sddm.drv-0/ocrin.ppm machine: Session Layout O O 0 1 : 0 9 Wednesday, June 21, 2017 |_ I Select your user and enter password
* nixos tests: waitUntilTTYMatches: Log TTY contents on last tryGraham Christensen2017-06-20
| | | | | | | | | | | | | | | If the test has not passed yet, on the last attempt it now outputs: machine: Last chance to match /logine: / on TTY2, which currently contains: machine: running command: fold -w$(stty -F /dev/tty2 size | awk '{print $2}') /dev/vcs2 machine: exit status 0 machine: <<< Welcome to NixOS 17.09.git.a804ef4 (x86_64) - tty2 >>> machine login: to help debug the problem. Notice the "logine" typo in my check.
* nixos tests: retry: Count down to 0, and pass remaining attempts to the subGraham Christensen2017-06-20
| | | | Allows test functions to output diagnostic information on failure.
* NixOS VM tests: Don't create a setgid group in vde_switchEelco Dolstra2017-06-07
| | | | | | Nix no longer allows this for security reasons. http://hydra.nixos.org/build/53993125
* test-driver: sendKeys() support for capital lettersVolth2017-05-19
|
* make-disk-image: change to be less VM-centricDan Peebles2017-04-24
| | | | | | | | | | This changes much of the make-disk-image.nix logic (and thus most NixOS image building) to use LKL to set up the target directory structure rather than a Linux VM. The only work we still do in a VM is less IO-heavy stuff that while still time-consuming, is less of the overall load. The goal is to kill more of that stuff, but that will require deeper changes to NixOS activation scripts and switch-to-configuration.pl, and I don't want to bite off too much at once.
* nixos/testing: Improve quality of OCRaszlig2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, we're now using ImageMagick to improve the screenshot so that Tesseract has an esier time to recognize the text. The resulting image of this post-processing is a scaled up black-and-white version with the backgrounds almost entirely removed and the text edges a bit blurred, so the screen shots now more or less resemble an image from a scanner rather. This is what Tesseract is trained for by default. As mentioned in the previous commit we now also use Tesseract 4, which further improves the quality of text recognition. I've spent countless hours just to test different postprocessing variants and testing what works best for our tests and this is the one that worked best so far. It's certainly not perfect and I'd like to avoid the scaling step but we're way better off than before. In addition to this, the OCR process is now done without an intermediate file, solely using pipes. I've tested this using the following VM tests which have OCR enabled: * nixos/tests/chromium.nix -A stable * nixos/tests/emacs-daemon.nix * nixos/tests/installer.nix -A luksroot * nixos/tests/lightdm.nix * nixos/tests/plasma5.nix * nixos/tests/sddm.nix All of the tests still succeed and comparing some of the recognition results to the earlier results it now also detects a lot more text than before this commit. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* tesseract: Reintroduce enableLanguagesaszlig2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | I've removed that attribute in 68bc260ca2d71a676dd6afdb3524d4fff483016b, because the language files no longer were distributed as seperate files, but if we for example only want to use the English training data, the closure size of Tesseract gets quite large (around 1.2 GB), which is a bit much just to be able to run NixOS VM tests. For this reason I've also switched the VM tests back to using only the English language. Tested using the following VM tests (the ones that have OCR enabled) on x86_64-linux: * nixos/tests/chromium.nix -A stable * nixos/tests/emacs-daemon.nix * nixos/tests/installer.nix -A luksroot * nixos/tests/lightdm.nix * nixos/tests/plasma5.nix * nixos/tests/sddm.nix Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* makeTest: don't rely on makeWrapper not quoting newlinesNikolay Amiantov2017-03-20
|
* make-disk-image.nix: set last fsck time on ext4 images to enable ↵Dan Peebles2017-02-26
| | | | resize-on-startup
* make-disk-image.nix: support additional filesystem contentsDan Peebles2017-02-22
| | | | | | | | | This makes make-disk-image.nix slightly more consistent with other image builders we have. Unfortunately I duplicated some code in doing so, but this is temporary duplication on the path to consolidating everything. See https://github.com/NixOS/nixpkgs/issues/23052 for more details on that. I'm also exposing the option in the amazon-image.nix maintainer module.
* nixos/test: Fix escaping for copyFileFromHostaszlig2017-02-17
| | | | | | | | | A long-time issue and one of the reasons I've never used that function before. So let's remove that todo-comment and escape the contents properly. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @edolstra
* nixos tests: make getTTYText smart about tty sizeGraham Christensen2017-02-12
|
* test-driver: support punctuation in sendCharsvolth2017-01-08
|
* eval-config.nix: configuration->configuration.nixChris Martin2017-01-04
| | | | | | | `configuration` seems to be a reference to an argument that was removed seven years ago in commit 2892aed7. `configuration.nix` makes it a big more clear what we're referring to.
* make-system-tarball.sh: use numeric uidsJoachim Fasting2017-01-01
| | | | | | | Ownership should now always be 0/0. Pointed out by @dezgeg at https://github.com/NixOS/nixpkgs/pull/21305#discussion_r93258149
* test-driver: Show test durationEelco Dolstra2016-12-29
|
* Tune mksquashfs for smaller isos.Lluís Batlle i Rossell2016-12-28
| | | | Bigger block size, more suitable for xz.
* make-system-tarball: create reproducible tarballsJoachim Fasting2016-12-20
| | | | | | | | | | | | Ensure that archive members are added in sorted order with a fixed mtime. This allows `nix-build --check` to succeed (when building a tarball of a simple system configuration). We also remove env-vars which doesn't appear to do much apart from capture a bunch of store paths we probably don't want. This is an alternative to https://github.com/NixOS/nixpkgs/pull/2281/commits/4b78a5b5fb8584347999832b3c67d1276488140b
* 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
* make-disk-image: make store validity fix optionalDomen Kožar2016-12-07
| | | | | | | This is useful for EC2 AMI generation to speedup the process. In my case it removes 13min out of 45min when generating an image on EC2.
* make-disk-image: run tune2fs after umount to skip fsckDomen Kožar2016-12-07
| | | | | | | | | | | | | | tune2fs marks the filesystem as clean to prevent resize2fs from complaining. But we were invoking it before we mounted the filesystem, so the counters would increase to 1 and it broke the functionality. By moving the call after the mount, I have confirmed it works by: $ nix-build nixos/tests/ec2.nix cc @rbvermaa @edolstra
* login test: Create and use direct reads of the TTY contents.Graham Christensen2016-11-30
|
* nixos: compress squashfs with xzFranz Pletz2016-11-23
|
* 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.
* nixos: generalize copy-paste from stage-1 and zfs to utilsJan Malakhovski2016-08-23
|