aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-08-28Introduce allowedRequisites featureGergely Risko
2014-08-21Fix testsEelco Dolstra
So all these years I was totally deluded about the meaning of "set -e". You might think that it causes statements like "false && true" or "! true" to fail, but it doesn't...
2014-08-20Use proper quotes everywhereEelco Dolstra
2014-08-20Reduce test verbosityEelco Dolstra
2014-08-13Remove log2html.xsl and friendsEelco Dolstra
It's part of Hydra now.
2014-07-30Rename nixPath to __nixPathEelco Dolstra
The name ‘nixPath’ breaks existing code.
2014-07-24tests/remote-builds.nix: Test failing buildEelco Dolstra
2014-07-24tests/remote-builds.nix: Don't try cache.nixos.orgEelco Dolstra
2014-07-16Handle case collisions on case-insensitive systemsEelco Dolstra
When running NixOps under Mac OS X, we need to be able to import store paths built on Linux into the local Nix store. However, HFS+ is usually case-insensitive, so if there are directories with file names that differ only in case, then importing will fail. The solution is to add a suffix ("~nix~case~hack~<integer>") to colliding files. For instance, if we have a directory containing xt_CONNMARK.h and xt_connmark.h, then the latter will be renamed to "xt_connmark.h~nix~case~hack~1". If a store path is dumped as a NAR, the suffixes are removed. Thus, importing and exporting via a case-insensitive Nix store is round-tripping. So when NixOps calls nix-copy-closure to copy the path to a Linux machine, you get the original file names back. Closes #119.
2014-07-14build-remote.pl: Fix building multiple output derivationsEelco Dolstra
We were importing paths without sorting them topologically, leading to "path is not valid" errors. See e.g. http://hydra.nixos.org/build/12451761
2014-07-11Fix testEelco Dolstra
2014-07-10Add a test for the SSH substituterEelco Dolstra
2014-07-04Add builtin function ‘fromJSON’Eelco Dolstra
Fixes #294.
2014-06-10== operator: Ignore string contextEelco Dolstra
There really is no case I can think of where taking the context into account is useful. Mostly it's just very inconvenient.
2014-05-29Fix testEelco Dolstra
2014-05-26Make the Nix search path declarativeEelco Dolstra
Nix search path lookups like <nixpkgs> are now desugared to ‘findFile nixPath <nixpkgs>’, where ‘findFile’ is a new primop. Thus you can override the search path simply by saying let nixPath = [ { prefix = "nixpkgs"; path = "/my-nixpkgs"; } ]; in ... <nixpkgs> ... In conjunction with ‘scopedImport’ (commit c273c15cb13bb86420dda1e5341a4e19517532b5), the Nix search path can be propagated across imports, e.g. let overrides = { nixPath = [ ... ] ++ builtins.nixPath; import = fn: scopedImport overrides fn; scopedImport = attrs: fn: scopedImport (overrides // attrs) fn; builtins = builtins // overrides; }; in scopedImport overrides ./nixos
2014-05-26Ensure that -I flags get included in nixPathEelco Dolstra
Also fixes #261.
2014-05-26Add constant ‘nixPath’Eelco Dolstra
It contains the Nix expression search path as a list of { prefix, path } sets, e.g. [ { path = "/nix/var/nix/profiles/per-user/root/channels/nixos"; prefix = ""; } { path = "/etc/nixos/configuration.nix"; prefix = "nixos-config"; } { path = "/home/eelco/Dev/nix/inst/share/nix/corepkgs"; prefix = "nix"; } ]
2014-05-26Add primop ‘scopedImport’Eelco Dolstra
‘scopedImport’ works like ‘import’, except that it takes a set of attributes to be added to the lexical scope of the expression, essentially extending or overriding the builtin variables. For instance, the expression scopedImport { x = 1; } ./foo.nix where foo.nix contains ‘x’, will evaluate to 1. This has a few applications: * It allows getting rid of function argument specifications in package expressions. For instance, a package expression like: { stdenv, fetchurl, libfoo }: stdenv.mkDerivation { ... buildInputs = [ libfoo ]; } can now we written as just stdenv.mkDerivation { ... buildInputs = [ libfoo ]; } and imported in all-packages.nix as: bar = scopedImport pkgs ./bar.nix; So whereas we once had dependencies listed in three places (buildInputs, the function, and the call site), they now only need to appear in one place. * It allows overriding builtin functions. For instance, to trace all calls to ‘map’: let overrides = { map = f: xs: builtins.trace "map called!" (map f xs); # Ensure that our override gets propagated by calls to # import/scopedImport. import = fn: scopedImport overrides fn; scopedImport = attrs: fn: scopedImport (overrides // attrs) fn; # Also update ‘builtins’. builtins = builtins // overrides; }; in scopedImport overrides ./bla.nix * Similarly, it allows extending the set of builtin functions. For instance, during Nixpkgs/NixOS evaluation, the Nixpkgs library functions could be added to the default scope. There is a downside: calls to scopedImport are not memoized, unlike import. So importing a file multiple times leads to multiple parsings / evaluations. It would be possible to construct the AST only once, but that would require careful handling of variables/environments.
2014-05-22Disable parallel.sh testEelco Dolstra
It breaks randomly: http://hydra.nixos.org/build/11152871
2014-05-02Fix Debian testsEelco Dolstra
These actually run as root in a VM, so they get confused. http://hydra.nixos.org/build/10775854
2014-04-15Fix test evaluationEelco Dolstra
2014-03-10If a dynamic attribute name evaluates to null, remove it from the setShea Levy
2014-02-26DohEelco Dolstra
2014-02-26Test trace and addErrorContextEelco Dolstra
2014-02-26Test some more primopsEelco Dolstra
2014-02-26Test executables in NARsEelco Dolstra
2014-02-26Test nix-env --switch-generationEelco Dolstra
2014-02-26Test nix-env --setEelco Dolstra
2014-02-26Test the -b and -s flags of nix-store -qEelco Dolstra
2014-02-26Test ~/.nix-defexprEelco Dolstra
2014-02-26Test nix-store --switch-profile and more daemon actionsEelco Dolstra
2014-02-26Test nix-store -q --rootsEelco Dolstra
2014-02-26Test nix-store -lEelco Dolstra
2014-02-26Test nix-store --optimiseEelco Dolstra
2014-02-26Add a test for nix-store --dump-db / --load-dbEelco Dolstra
2014-02-19nix-instantiate: Rename --eval-only to --eval, --parse-only to --parseEelco Dolstra
2014-02-17Test nix-store --verify-path and --repair-pathEelco Dolstra
2014-02-17Add a test for repairing pathsEelco Dolstra
2014-02-06Clean up a test warningEelco Dolstra
2014-02-06Drop dependency on ‘expr’Eelco Dolstra
http://hydra.nixos.org/build/8715639 Not sure why this causes a failure now.
2014-02-01Fix logging testEelco Dolstra
2014-02-01Fix the nix-profile testEelco Dolstra
2014-02-01Remove AutomakefilesEelco Dolstra
2014-02-01Update Makefile variable namesEelco Dolstra
2014-01-30Rename Makefile -> local.mkEelco Dolstra
2014-01-21Merge branch 'master' into makeEelco Dolstra
Conflicts: src/libexpr/eval.cc
2014-01-14Allow "bare" dynamic attrsShea Levy
Now, in addition to a."${b}".c, you can write a.${b}.c (applicable wherever dynamic attributes are valid). Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-08Fix signed-binary-caches testEelco Dolstra
2014-01-08Test whether Nix correctly checks the hash of downloaded NARsEelco Dolstra