summaryrefslogtreecommitdiffstats
path: root/nixos/lib
AgeCommit message (Collapse)Author
2016-05-26nixos/test-driver/Logger: Replace invalid UTF-8aszlig
Regression introduced by d84741a4bfb6ed2531ec7154479c147d2c9a737c. The mentioned commit actually is a good thing, because we now get the output from the X session. Unfortunately, for the i3wm test, the i3-config-wizard prints out the raw keyboard symbols directly coming from xcb, so the output isn't necessarily proper UTF-8. As the XML::Writer already expects valid UTF-8 input, we assume that everything that comes into sanitise() will be UTF-8 from the start. So we just decode() it using FB_DEFAULT as the check argument so that every invalid character is replaced by the unicode replacement character: https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character We simply re-oncode it again afterwards and return it, so we should always get out valid UTF-8 in the log XML. For more information about FB_DEFAULT and FB_CROAK, have a look at: http://search.cpan.org/~dankogai/Encode-2.84/Encode.pm#Handling_Malformed_Data Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-05-24test-driver: Fix "unit X is inactive and there are no pending jobs"Eelco Dolstra
This was causing many random test failures.
2016-04-25treewide: Use correct output in ${config.nix.package}/binTuomas Tynkkynen
2016-04-12Fix X11 tests broken by the removal of -acEelco Dolstra
Probably missed a few. Also adding xauth to the system path (it was already in the closure).
2016-03-30Fix the EC2 testEelco Dolstra
We now generate a qcow2 image to prevent hitting Hydra's output size limit. Also updated /root/user-data -> /etc/ec2-metadata/user-data. http://hydra.nixos.org/build/33843133
2016-03-29nixos/lib/testing.nix: make 'config' a free variableDomen Kožar
cc @edolstra
2016-03-15Combine ISO generation stepsEelco Dolstra
This folds adding hydra-build-products into the actual ISO generation, preventing an unnecessary download of the ISO.
2016-03-15Combine OVA generation stepsEelco Dolstra
Previously this was done in three derivations (one to build the raw disk image, one to convert to OVA, one to add a hydra-build-products file). Now it's done in one step to reduce the amount of copying to/from S3. In particular, not uploading the raw disk image prevents us from hitting hydra-queue-runner's size limit of 2 GiB.
2016-03-07wheter → whetherProfpatsch
Nice weather today, isn’t it?
2016-03-01Revert "Add the tool "nixos-typecheck" that can check an option declaration to:"Eelco Dolstra
This reverts commit cad8957eabcbf73062226d28366fd446c15c8737. It breaks NixOps, but more importantly, such major changes to the module system really need to be reviewed.
2016-02-29Add the tool "nixos-typecheck" that can check an option declaration to:Thomas Strobel
- Enforce that an option declaration has a "defaultText" if and only if the type of the option derives from "package", "packageSet" or "nixpkgsConfig" and if a "default" attribute is defined. - Enforce that the value of the "example" attribute is wrapped with "literalExample" if the type of the option derives from "package", "packageSet" or "nixpkgsConfig". - Warn if a "defaultText" is defined in an option declaration if the type of the option does not derive from "package", "packageSet" or "nixpkgsConfig". - Warn if no "type" is defined in an option declaration.
2015-12-30waitForUnit: Fail if the unit reaches inactive state with no pending jobsEelco Dolstra
This prevents waitForUnit for looping for many minutes before giving up.
2015-11-28Enable to create hybrid ISO without UEFI bootTimofei Kushnir
2015-10-26nova-image: use make-disk-image.nixDomen Kožar
2015-10-06Give more memory for the disk image builderEelco Dolstra
http://hydra.nixos.org/build/26480662
2015-09-28Fix Nix database in generated imagesEelco Dolstra
This prevents seeing lots of warnings about missing hashes/sizes in the database when running "nix-store --verify --check-contents" for the first time.
2015-09-28Use make-disk-image.nix for VirtualBox imagesEelco Dolstra
2015-09-27Update AMI generatorEelco Dolstra
The EBS and S3 (instance-store) AMIs are now created from the same image. HVM instance-store AMIs are also generated. Disk image generation has been factored out into a function (nixos/lib/make-disk-image.nix) that can be used to build other kinds of images.
2015-09-03nixos: move left-behind allowUnfree commentTobias Geerinckx-Rice
2015-08-26Prefer local build for the test driver scriptEelco Dolstra
2015-08-09Update option-usages.nix expression to work with newer version of the module ↵Nicolas B. Pierron
system.
2015-08-05Unify NixOS and Nixpkgs channel structureEelco Dolstra
This is primarily to ensure that -I nixpkgs=https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz and -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz and -I nixpkgs=https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz behave consistently. It also allows installing packages via "nix-env -iA nixos.<pkg>" rather than "nixos.pkgs.<pkg>". It would be even better to allow "nixpkgs.<pkg>", but that requires a change to nix-channel. Fixes #7659.
2015-07-30nixUnstable: Update to 1.10pre4200_76cc8e9Eelco Dolstra
Also unify the nixStable and nixUnstable expressions.
2015-07-29Merge pull request #8978 from dezgeg/pr-arm-imagesviric
ARM SD card image expressions
2015-07-28Remove zipTwoListsEelco Dolstra
This function is redundant (we also have zipLists).
2015-07-26nixos: Add derivations for SD card installation images on ARMTuomas Tynkkynen
The resulting image can be copied to a SD card with `dd` and is directly bootable by a suitably configured U-Boot. Though depending on the board, some extra steps are required for copying U-Boot itself to the SD card. Inside the image is a partition table, with a FAT32 /boot and a normal writable EXT4 rootfs. It's possible to directly reuse the SD image's partition layout and "install" NixOS on the same SD card by replacing the default configuration.nix and nixos-rebuild, and actually is the preferred way to use these images. To assist in this installation method, the boot scripts on the image automatically resize the rootfs partition to fit the SD card on the first boot. The SD images come in two flavors; one for the ARMv6 Raspberry Pi, and one multiplatform image for all the boards supported by the mainline kernel's multi_v7_defconfig config target. At the moment, these have been tested on: - Raspberry Pi Model B (512MB model) - NVIDIA Jetson TK1 - Linksprite pcDuino3 Nano To build, run: nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage \ -I nixos-config='<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>'
2015-07-12all tests: added meta.maintainers sectionJoachim Schiele
2015-06-13Factor the NixOS channel building code out into its own file, so I can use ↵Dan Peebles
it elsewhere
2015-06-11Simple EC2 user-data VM testDan Peebles
2015-06-10Merge pull request #8204 from copumpkin/modulesPathDaniel Peebles
An importable modulesPath, once again
2015-06-10Drop obsolete boot=on parameterEelco Dolstra
2015-06-08Bring an importable modulesPath back from the dead, in the only way I knowDan Peebles
2015-05-22nixos/test-driver: Fix bashism in Machine.pm.aszlig
Thanks to @bjornfor for the note. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-05-22nixos/testing: Use stripped down tesseract only.aszlig
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>
2015-05-22nixos/test-driver: Make tesseract OCR optional.aszlig
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>
2015-05-21nixos/test-driver: Add new waitForText function.aszlig
As promised in the previous commit, this can be used similarly to $machine->waitForWindow, where you supply a regular expression and it's retrying OCR until the regexp matches. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-05-21nixos/test-driver: Add new getScreenText function.aszlig
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>
2015-04-10VM tests: Don't produce output on failureEelco Dolstra
Producing output makes it hard to restart builds that failed for intermittent reasons (like timeouts). So let's not do that.
2015-04-03Merge rename.nix changes.Nicolas B. Pierron
2015-03-24nixos: test: add tests for booting installation iso in various waysBob van der Linden
2015-03-24nixos: iso-image: filename escaping in xorrisoBob van der Linden
2015-03-24nixos: iso-image: use syslinux bootloader for USB booting supportBob van der Linden
This changes the bootloader for iso generation from Grub to syslinux. In addition this adds USB booting support, so that "dd" can be used to burn the generated ISO to USB thumbdrives instead of needing applications like UnetBootin.
2015-03-15Document and rename internal option of modules.Nicolas B. Pierron
2015-03-12Move most extra args out of eval-config.nixShea Levy
2015-03-12Add comments about the module system interfaceShea Levy
Ideally the module system could be configured pretty much completely by the contents of the modules themselves, so add comments about avoiding complicating it further and possibly removing now-redundant configurability from the existing interface.
2015-03-12evalModules: Add internal option for the check argumentShea Levy
2015-03-12nixos: Don't evaluate twice to get the value of config.nixpkgsShea Levy
2015-02-19In a test VM it's impossible to connect to itself, so fix thisSander van der Burg
2014-12-16nixos: allow adding extra modules through environmentMathijs Kwik
This is useful for adding extra functionality or defaults to _every_ nixos evaluation. My use case is overriding behaviour for all nixos tests, for example setting packageOverrides to newer versions and changing some default dependencies/settings. By making this accessible through an environment variable, this can now be fully accomplished externally. No more need to fork nixos/nixpkgs (which becomes a maintenance burden), just use the channel instead and plug in via this envvar.
2014-12-11nixos/make-system-tarball: extra commands to be executed before archiveJaka Hudoklin