about summary refs log tree commit diff
path: root/lib/tests
AgeCommit message (Collapse)AuthorFilesLines
2019-07-11make-tarball / lib-tests: reduce duplicationFrederik Rietdijk1-11/+4
The misc.nix and systems.nix tests were invoked at three different places. Let's not that.
2019-07-10Revert "Revert "systems/doubles.nix: add Apple doubles""Matthew Bauer1-3/+3
This reverts commit ce2f74df2cade57e74c235292c8b074281903e71. Doubles are treated as -darwin here, to provide some consistency. There is some ambiguity between “x86_64-darwin” and “i686-darwin” which could refer to binaries linked between iOS simulator or real macOS binaries. useiOSPrebuilt can be used to determine which to use, however.
2019-06-04systems: fix lib-testsMatthew Bauer1-5/+5
These were broken by the added system doubles. This just adds those to the lib-tests.
2019-04-25tests/systems: fix testsMatthew Bauer1-1/+1
2019-02-07Fix the documentation for the tests to reflect what is actually happening.(cdep)illabout2-2/+8
2019-01-24lib/modules: Change mkAliasOptionModule to use the priority for the alias.(cdep)illabout3-3/+3
This commit changes the `mkAliasOptionModule` function to make sure that the priority for the aliased option is propagated to the non-aliased option. This also affects the `mkRenamedOptionModule` function in a similar fashion. This also removes the `mkAliasOptionModuleWithPriority` function, since its functionality is now subsumed by `mkAliasOptionModule`. This change was recommended by @nbp: https://github.com/NixOS/nixpkgs/pull/53397#discussion_r245487432
2019-01-06Add test that shows that the aliases are able to override options.(cdep)illabout2-0/+55
2019-01-04lib/modules: Add a function to create an option alias that respects the priority(cdep)illabout1-1/+1
This commit adds a function `mkAliasOptionModuleWithPriority`. This function will make an alias to an existing option and copy over the priority. This functionality is needed for PRs like #53041. In that case `nixos-generate-config` added an option to `hardware-configuration.nix` with `mkDefault`. That option was then changed and an alias created for the old name. The end user should be able to set the non-alias option in their `configuration.nix` and have everything work correctly. Without this function, the priority for the option won't be copied over correctly and the end-user will get a message saying they have the same option set to two different values.
2019-01-04Add a failing test for mkAliasOptionModule.(cdep)illabout2-0/+55
2018-12-30Remove composableDerivation, closes #18763Frederik Rietdijk1-38/+0
2018-10-20lib.isStorePath: fix `false` result when passed a path objectTim Cuthbertson1-1/+1
Since `isStorePath` relies on comparing against builtins.storeDir (a string), we need to convert the input into a string as well.
2018-10-18tests/systems.nix: fix testsMatthew Bauer1-14/+15
these weren’t being run correctly
2018-10-15generators: make toPretty handle floats correctlyLéo Gaspard1-0/+2
2018-09-18Merge pull request #46336 from Infinisil/overrideExistingJörg Thalheim1-0/+14
lib: Improve overrideExisting implementation
2018-09-17lib/tests: Add overrideExisting testsSilvan Mosberger1-0/+14
2018-09-16Merge pull request #36287 from shlevy/lib-tests-defaultGraham Christensen1-0/+7
lib/tests: Add check-eval.nix to run simple tests.
2018-09-06Merge branch 'no-toPath'Shea Levy1-2/+2
2018-08-28hurd: cleanup unmaintained targetJörg Thalheim1-1/+1
This has been not touched in 6 years. Let's remove it to cause less problems when adding new cross-compiling infrastructure. This also simplify gcc significantly.
2018-08-15lib/recursiveUpdateUntil: add a test & release note for fixProfpatsch1-0/+24
2018-07-20[bot]: remove unreferenced codevolth1-4/+0
2018-06-10lib: bitAnd, bitOr, bitXor (bitsize-agnostic fallback function) (#41491)volth1-0/+15
* lib: bitAnd, bitOr, bitXor * lib: test for bitAnd, bitOr, bitXor * lib: bitsize-agnostic zipIntBits * lib: bitNot * lib: bitNot
2018-06-05Revert "lib: bitAnd, bitOr, bitXor"Profpatsch1-15/+0
2018-06-02lib: test for bitAnd, bitOr, bitXorvolth1-0/+15
2018-05-22treewide: Remove uses of builtins.toPath.Shea Levy1-2/+2
toPath has confusing semantics and is never necessary; it can always either just be omitted or replaced by pre-concatenating `/.`. It has been marked as "!!! obsolete?" for more than 10 years in a C++ comment, hopefully removing it will let us properly deprecate and, eventually, remove it.
2018-05-07lib.types: fix loaOf behavior for long listsRobert Helgesson3-0/+44
Assigning a list of 10 or more elements to an option having the type `loaOf a` produces a configuration value that is not honoring the order of the original list. This commit fixes this and a related issue arising when 10 or more lists are merged into this type of option.
2018-05-06lib/types: clear up coercedTo descriptionSilvan Mosberger1-2/+2
2018-05-06lib/types: Add coercedTo unsound testsSilvan Mosberger4-0/+21
2018-04-25lib/generators: print paths without quotes & move function downProfpatsch1-3/+5
2018-03-29lib/generators: introduce a sane default for `mkValueString`Profpatsch1-0/+26
So far, `mkValueString` defaulted to `toString`, which is a bad match for most configuration file formats, especially because how booleans are formatted. This also improves error messages for unsupported types. Add a test to codify the formatting.
2018-03-20Remove obsolete /nix/var/nix/{manifests,channel-cache}Eelco Dolstra1-1/+0
2018-03-09lib.isStorePath: Fix derivation detectionShea Levy1-0/+2
2018-03-08lib-tests: Don't depend on /bin/shShea Levy1-1/+1
https://hydra.nixos.org/build/70748333
2018-03-04lib/tests: Add check-eval.nix to run simple tests.Shea Levy1-0/+7
This can be used by evaluation-only tools to validate tests are still working.
2018-02-23lib, treewide: Add missing MIPS arches, and fix existing usageDaniel Barlow1-2/+2
Existing "mips64el" should be "mipsel". This is just the barest minimum so that nixpkgs can recognize them as systems - although required for building individual derivations onto MIPS boards, it is not sufficient if you want to actually build nixos on those targets
2017-11-22lib/generators: add mkValueString to mkKeyValueDefault generatorProfpatsch1-1/+1
This means the generation of values can now be influenced, even down from e.g. an INI generator. Breaks the interface of `mkKeyValueDefault` to match its interface to other generator functions. It might me sensible to rename `mkKeyValue` and `mkKeyValueSet` to conform to the `toX`-style of generator functions.
2017-11-05lib/types: add `ints.positive`.Profpatsch3-0/+14
For values that are positive, but cannot be 0.
2017-11-05lib/types: update docs to match the new type namesProfpatsch4-0/+24
2017-11-05lib/types: add tests for `ints.between` and `ints.unsigned`Profpatsch1-1/+9
The int types are trivial invocations of `ints.between`, so they are not tested explicitely.
2017-06-22lib/generators: put more information in toPretty lambdasProfpatsch1-0/+2
With `builtins.functionArgs` we can get some information if the first argument is an attrset and whether the contained fields have default values. Encode that into the pretty-printed lambda.
2017-06-22lib/generators: toPrettyProfpatsch1-0/+30
`toPretty` implements a pretty printer for nix values.
2017-06-09lib-tests: fix test for isStorePathDaiderd Jordan1-1/+1
2017-05-30Add `isStorePath` tests (#26223)Profpatsch1-4/+34
2017-05-21lib tests: Simplify relative path for default argumentJohn Ericson1-1/+1
2017-05-17lib: Consolidate tests into one meta jobJohn Ericson3-40/+331
2017-04-17lib: Fix preexisting bugs in old platforms code (now bugs in tests)John Ericson1-2/+2
Warning, this changes the compatibility claims of existing packages!
2017-04-17lib: Fix system parsing, and use for doubles listsJohn Ericson2-24/+64
The old hard-coded lists are now used to test system parsing. In the process, make an `assertTrue` in release lib for eval tests; also use it in release-cross
2017-03-03modules: add support for module replacement with disabledModulesDaiderd Jordan5-0/+24
This is based on a prototype Nicolas B. Pierron worked on during a discussion we had at FOSDEM. A new version with a workaround for problems of the reverted original. Discussion: https://github.com/NixOS/nixpkgs/commit/3f2566689
2017-03-01Revert "modules: add support for module replacement with disabledModules"Vladimír Čunát5-24/+0
This reverts commit 3f2566689d14f1d7778d55ca807d1dad2f4695d1 for now. Evaluation of the tested job got broken, blocking nixos-unstable.
2017-02-28use relative path for module testsDaiderd Jordan1-1/+1
2017-02-28modules: add support for module replacement with disabledModulesDaiderd Jordan5-0/+24
This is based on a prototype Nicolas B. Pierron worked on during a discussion we had at FOSDEM.