about summary refs log tree commit diff
path: root/nixos/lib
AgeCommit message (Collapse)AuthorFilesLines
2019-12-22nixos/python-test-driver: add an option to disable python linterMaximilian Bosch1-3/+7
While it's a good idea to automate the linting of the python code used for our tests, I think that it can be quite distracting when hacking on a NixOS test. I figured that it might be more convenient to add an option as a shortcut for this to avoid that everyone needs to dig into the test driver again.
2019-12-15nixos/displayManager: deprecate separate options for default wm/dmJan Tojnar2-4/+2
The upstream session files display managers use have no concept of sessions being composed from desktop manager and window manager. To be able to set upstream session files as default session, we need a single option. Having two different ways to set default session would be confusing, though, so we decided to deprecate the old method. We also created separate script for each session, just like we already had a separate desktop file for each one, and started using displayManager.sessionPackages mechanism to make the session handling more uniform.
2019-12-13nixos: compress make-ext4-fs with zstdBernardo Meurer1-18/+26
2019-12-03nixos/test: Use retry() in all looping functions that need timeoutsJacek Galowicz1-35/+73
2019-12-01Merge pull request #74077 from 7c6f434c/add-test-driver-py-copy-from-vmFlorian Klink1-1/+34
Add test driver py copy from vm
2019-11-25Merge pull request #73966 from d-goldin/nixosoptions_xml_strctxDomen Kožar1-1/+1
make-options-doc: fix string context issues
2019-11-25test-driver.py: add Machine.copy_from_vmMichael Raskin1-0/+33
2019-11-25test-driver.py: Fix the shared directory referenceMichael Raskin1-1/+1
2019-11-25nixos/tests: fail on failing subtestsRobin Gloster1-3/+4
This was the behaviour in the perl test driver too and a regression. Also cleaned up unused imports
2019-11-23make-options-doc: fix string context issuesDima1-1/+1
When using `documentation.nixos.includeAllModules = true;` with external modules, the string context might contain dependencies to derivations and so `toFile` refuses to evaluate; ``` error: in 'toFile': the file 'options.xml' cannot refer to derivation outputs, at [...]/nixpkgs/nixos/lib/make-options-doc/default.nix:89:16 ``` This is not an issue when using `writeText` (instead of manually stripping the context).
2019-11-21Merge pull request #73190 from flokli/ceph-tests-pythonFlorian Klink1-8/+16
WIP: nixos/ceph: port tests to python
2019-11-20nixos/test: let python driver evaluate test code in global scope so theJacek Galowicz1-1/+1
user can define and use functions
2019-11-20nixos/test: If qemu monitor returns 0, simply return (like perl script does)Jacek Galowicz1-2/+7
2019-11-20nixos/test: Fix child environment of python driverJacek Galowicz1-6/+9
2019-11-15Merge pull request #73251 from worldofpeace/remove-slimworldofpeace2-2/+0
nixos/slim: remove
2019-11-11nixos/slim: removeworldofpeace2-2/+0
The SLIM project is abandoned and their last release was in 2013. Because of this it poses a security risk to systems, no one is working on it or picked up maintenance. It also lacks compatibility with systemd and logind sessions. For users, there liikely isn't anything like slim that's as lightweight in terms of dependencies.
2019-11-11test-driver: add mypy supportJörg Thalheim2-91/+103
It's a good idea to expand this in future to test code as well, so we get type checking there as well.
2019-11-11nixos/tests: fix succeed() with multiple commandsFlorian Klink1-3/+5
we previously immediately returned the first commands output, and didn't execute any of the other commands. Now, return the last commands output. This should be documented in the method docstring.
2019-11-08nixos/tests: correct arguments to get_unit_infoLeonhard Markert1-1/+1
2019-11-08nixos/tests: improve get_unit_info expressiveness on failureMarijan Petricevic1-1/+5
2019-11-07Merge pull request #72943 from marijanp/port-test-driver-pythonworldofpeace1-0/+13
Port remaining test-driver functions to python
2019-11-07Merge pull request #72947 from tfc/boot-test-port-fixworldofpeace1-2/+2
Boot test port fix
2019-11-07nixos/test: Handle undecodable bytesJacek Galowicz1-1/+1
This threw exceptions in boot menus
2019-11-07Merge pull request #72835 from tfc/nixos-integration-test-portsworldofpeace1-1/+35
Nixos integration test ports
2019-11-06nixos/tests: implemented python test-driver version of forwardPortMarijan1-0/+8
2019-11-06nixos/tests: implemented python test-driver version of dumpTTYContentsMarijan1-0/+5
2019-11-06nixos/tests: Fix subprocess launch call for VM monitorJacek Galowicz1-1/+1
This crashed in the create-script case
2019-11-06nixos/tests: Ignore shutdown/crash if not bootedDaniel Schaefer1-2/+2
Condition seems to be inverted. Crash and shutdown only make sense, when the machine is booted; i.e. we return immediately otherwise. In the Perl test driver this is: return unless $self->{booted};
2019-11-05nixos/tests: Implement python test-driver version of getWindowNames and ↵Jacek Galowicz1-0/+21
waitForWindow
2019-11-05nixos/tests: Implement python test-driver version of requireActiveUnitJacek Galowicz1-1/+14
2019-11-04nixos/test: use ptpython as replFlorian Klink2-7/+3
2019-11-04nixos/test: Port test driver to pythonJacek Galowicz2-0/+1041
Thanks @blitz and @jtraue for help with implementing machine methods
2019-10-18nixos/make-iso9660-image: Fix doc typoChuck1-1/+1
2019-10-18nixos/make-iso9660-image: Fix storeContents documentationChuck1-3/+3
`packages` was renamed to `storeContents` in 668c146e33291e933ccfb19fd39fab9cd2b7900d, but this comment describing its purpose was not updated to match.
2019-10-07Revert "make-disk-image: replace nixos-install by nix-env calls"Eelco Dolstra1-11/+3
This reverts commit e9bf955fd6d5ffda218878ba561c93c6a28dfe8e. We use nixos-install to ensure that make-disk-image produces the same result as a regular installation (9802da517fe4da41d68516029b01c5c1f175b3e4) and to reduce code duplication. If there is something broken in nixos-install, it should be fixed there.
2019-09-29make-disk-image: replace nixos-install by nix-env callsChristian Kögler1-3/+11
nixos-install can only be called from a machine
2019-09-08nixos/lib/utils: Make the set recursive again, unbreak evalSarah Brofeldt1-1/+1
2019-09-07Merge pull request #66274 from talyz/gitlabFlorian Klink1-0/+112
nixos/gitlab: Add support for secure secrets and more
2019-09-06nixos/utils: Handle arbitrary secrets in JSON output filestalyz1-0/+112
Introduce new functions which allows modules to define options where, if the input is an attrset and the output is JSON, the user can define arbitrary secrets.
2019-08-28treewide: remove redundant recvolth2-2/+2
2019-08-28Merge staging-next into stagingFrederik Rietdijk1-3/+3
2019-08-26treewide: remove redundant quotesvolth1-4/+4
2019-08-18Merge branch 'master' into flip-map-foreachdanbst4-1/+516
2019-08-12pkgs.lib -> libDomen Kožar1-3/+3
2019-08-10make-options-doc: add asciidoc variantDomen Kožar1-0/+38
2019-08-10make-options-doc: expose Nix setDomen Kožar1-4/+5
2019-08-08Extract NixOS options documentation generation to a functionDomen Kožar3-0/+476
Motivation is to support other repositories containing nixos modules that would like to generate options documentation: - nix-darwin - private repos - arion - ??
2019-08-07Make hostname in tests overridableNikola Knezevic1-1/+1
The original form effectively forbade any NixOS configuration that is under test to explicitly set the hostname.
2019-08-05Merge branch 'master' into flip-map-foreachDanylo Hlynskyi1-2/+10
2019-08-05mass replace "flip map -> forEach"danbst1-3/+3
See `forEach`-introduction commit. ``` rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g' ```