about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-02-07 tests: Add (failing) tests for reported --dry-run issues.Will Dietz2-0/+50
2018-02-07 builtins.path test: Don't rely on shlevy's XDG_RUNTIME_DIRShea Levy1-1/+0
2018-02-07 Improve filtering of ANSI escape sequences in build logsEelco Dolstra1-1/+1
All ANSI sequences except color setting are now filtered out. In particular, terminal resets (such as from NixOS VM tests) are filtered out. Also, fix the completely broken tab character handling.
2018-02-07 Merge pull request #1816 from shlevy/add-pathEelco Dolstra3-0/+9
Add path primop.
2018-02-06 Add path primop.Shea Levy3-0/+9
builtins.path allows specifying the name of a path (which makes paths with store-illegal names now addable), allows adding paths with flat instead of recursive hashes, allows specifying a filter (so is a generalization of filterSource), and allows specifying an expected hash (enabling safe path adding in pure mode).
2018-02-06 realiseContext(): Add derivation outputs to the allowed pathsEelco Dolstra1-0/+2
This makes import-from-derivation work in restricted mode again.
2018-02-05 Fix evaluationEelco Dolstra1-1/+1
2018-02-03 Remove nix-build --hashEelco Dolstra1-3/+10
Instead, if a fixed-output derivation produces has an incorrect output hash, we now unconditionally move the outputs to the path corresponding with the actual hash and register it as valid. Thus, after correcting the hash in the Nix expression (e.g. in a fetchurl call), the fixed-output derivation doesn't have to be built again. It would still be good to have a command for reporting the actual hash of a fixed-output derivation (instead of throwing an error), but "nix-build --hash" didn't do that.
2018-02-01 Remove obsolete references to manifestsEelco Dolstra1-1/+0
Closes #323.
2018-01-24 Merge pull request #1797 from dezgeg/userns-tests-fixEelco Dolstra4-16/+33
Fix tests using user namespaces on kernels that don't have it
2018-01-22 Fix testEelco Dolstra1-2/+2
https://hydra.nixos.org/build/67806811
2018-01-22 Don't access tarballs.nixos.org in a testEelco Dolstra1-3/+3
https://hydra.nixos.org/build/67806811
2018-01-19 Rewrite builtin derivation environmentEelco Dolstra2-0/+19
Also add a test. Fixes #1803. Closes #1805.
2018-01-19 Add a test for --check / --repeatEelco Dolstra3-1/+32
2018-01-16 Add pure evaluation modeEelco Dolstra7-2/+47
In this mode, the following restrictions apply: * The builtins currentTime, currentSystem and storePath throw an error. * $NIX_PATH and -I are ignored. * fetchGit and fetchMercurial require a revision hash. * fetchurl and fetchTarball require a sha256 attribute. * No file system access is allowed outside of the paths returned by fetch{Git,Mercurial,url,Tarball}. Thus 'nix build -f ./foo.nix' is not allowed. Thus, the evaluation result is completely reproducible from the command line arguments. E.g. nix build --pure-eval '( let nix = fetchGit { url = https://github.com/NixOS/nixpkgs.git; rev = "9c927de4b179a6dd210dd88d34bda8af4b575680"; }; nixpkgs = fetchGit { url = https://github.com/NixOS/nixpkgs.git; ref = "release-17.09"; rev = "66b4de79e3841530e6d9c6baf98702aa1f7124e4"; }; in (import (nix + "/release.nix") { inherit nix nixpkgs; }).build.x86_64-linux )' The goal is to enable completely reproducible and traceable evaluation. For example, a NixOS configuration could be fully described by a single Git commit hash. 'nixos-rebuild' would do something like nix build --pure-eval '( (import (fetchGit { url = file:///my-nixos-config; rev = "..."; })).system ') where the Git repository /my-nixos-config would use further fetchGit calls or Git externals to fetch Nixpkgs and whatever other dependencies it has. Either way, the commit hash would uniquely identify the NixOS configuration and allow it to reproduced.
2018-01-13 Fix tests using user namespaces on kernels that don't have itTuomas Tynkkynen4-16/+33
Disable various tests if the kernel doesn't support unprivileged user namespaces (e.g. Arch Linux disables them) or disable them via a sysctl (Debian, Ubuntu). Fixes #1521 Fixes #1625
2018-01-09 fetchGit.sh: Test we don't "corrupt" cache if invoke w/o git availWill Dietz1-0/+13
2018-01-04 Rename "use-substitutes" to "substitute"Eelco Dolstra1-1/+1
Commit c2154d4c8422ddc1c201d503bb52edff854af2ad renamed "build-use-substitutes" to "use-substitutes", but that broke "nix-copy-closure --use-substitutes".
2018-01-02 Merge pull request #1770 from dtzWill/fix/run-test-sandbox-ubuntuEelco Dolstra1-2/+2
run.sh: include lib64 in sandbox-paths to fix on ubuntu 16.XX
2017-12-30 run.sh: include lib64 in sandbox-paths to fix on ubuntu 16.XXWill Dietz1-2/+2
(cc #1769)
2017-12-30 use libbrotli directly when availableWill Dietz3-1/+31
* Look for both 'brotli' and 'bro' as external command, since upstream has renamed it in newer versions. If neither are found, current runtime behavior is preserved: try to find 'bro' on PATH. * Limit amount handed to BrotliEncoderCompressStream to ensure interrupts are processed in a timely manner. Testing shows negligible performance impact. (Other compression sinks don't seem to require this)
2017-12-22 fetchGit: Fix handling of local repo when not using 'master' branchWill Dietz1-0/+26
Add tests checking this behavior.
2017-12-22 release.nix: Use fetchTarball and fetchGitEelco Dolstra3-6/+6
In particular, using fetchGit means we don't need hackery to clean the source tree when building from an unclean tree.
2017-12-07 Fix testEelco Dolstra1-1/+1
2017-12-07 nix ls-{nar,store}: Return offset of files in the NAR if knownEelco Dolstra1-2/+2
E.g. $ nix ls-store --json --recursive --store https://cache.nixos.org /nix/store/b0w2hafndl09h64fhb86kw6bmhbmnpm1-blender-2.79 \ | jq .entries.bin.entries.blender.narOffset 400
2017-12-05 Merge branch 'fetchGit-fast-revision-update'Shea Levy2-0/+8
2017-11-25 build-remote: Fix missing log outputaszlig1-1/+4
The storeUri variable in the build-remote hook is declared very much to the start of the main function and a bunch of lines later, the same variable gets checked via hasPrefix() but it gets assigned *after* that check when the most suitable machine for the build was choosen. So I guess this was just a typo in d16fd2497374671c92cb877f9570d65783a7 and what we really want is to either checkd the prefix *after* assigning storeUri or use bestMachine->storeUri directly. I choose the latter, because the former could introduce even more regressions if the try block where the variable gets assigned terminates early. Nevertheless, the reason why the log output didn't work is because hasPrefix() checked for "ssh://" in front of storeUri, but if the storeUri isn't set correctly (or at all), we don't get the log file descriptor set up properly, leading to no log output. I've adjusted the remote-builds test to include a regression test for this, so that we can make sure we get a build output when using remote builds. In addition to that I've tested this with two of my build farms and the build logs are emitted correctly again. Signed-off-by: aszlig <aszlig@nix.build>
2017-11-24 nix-shell/nix-build: Support .drv files againEelco Dolstra3-2/+28
Fixes #1663. Also handle '!<output-name>' (#1694).
2017-11-24 fetchGit: Ignore tarballTtl if rev is set and not in the repo.Shea Levy2-0/+8
Fixes #1697.
2017-11-21 tests/run.sh: Fix /build conflict when building in a sandboxEelco Dolstra1-1/+3
https://hydra.nixos.org/build/64519355
2017-11-21 fetchGit/fetchMercurial: Fix directory inclusion checkEelco Dolstra2-2/+6
E.g. the existence of .gitignore would cause .git to be included.
2017-11-20 Add tests for verifying/copying content-addressed pathsEelco Dolstra1-1/+14
These don't require signatures.
2017-11-20 Add tests for signature checking when copying between local storesEelco Dolstra1-0/+20
2017-11-20 Add tests for "nix run"Eelco Dolstra3-1/+46
2017-11-20 Test: Replace --option with the corresponding flagEelco Dolstra11-45/+45
2017-11-20 signed-binary-caches -> require-sigsEelco Dolstra2-11/+11
Unlike signed-binary-caches (which could only be '*' or ''), require-sigs is a proper Boolean option. The default is true.
2017-11-20 binary-cache-public-keys -> trusted-public-keysEelco Dolstra2-10/+10
The name had become a misnomer since it's not only for substitution from binary caches, but when adding/copying any (non-content-addressed) path to a store.
2017-11-15 DohEelco Dolstra1-0/+11
2017-11-14 nix sign-paths: Support binary cachesEelco Dolstra1-0/+6
2017-11-14 Add tests for "nix verify", "nix sign-paths" etc.Eelco Dolstra2-1/+64
2017-11-14 Revert "Don't parse "x:x" as a URI"Eelco Dolstra2-3/+2
This reverts commit f90f660b243866b8860eeb24cc4a345d32cc7ce7. This broke Hydra's release.nix, which contained preCheck = ''export LOGNAME=${LOGNAME:-foo}'';
2017-11-14 nix ls-{nar,store}: Don't abort on missing filesEelco Dolstra1-0/+4
2017-11-14 Add some testsEelco Dolstra1-4/+15
2017-11-14 Rename tests/nar-index -> tests/nar-accessEelco Dolstra3-3/+3
2017-11-07 Show when tests are skippedEelco Dolstra2-2/+2
Also, don't depend on tput (ncurses). It's really not needed since ANSI escape sequences have been standardized for 35 years or so.
2017-11-03 fetchGit/fetchMercurial: Filter out directories with untracked filesEelco Dolstra2-6/+12
2017-11-03 fetchGit: Add a testEelco Dolstra3-1/+85
2017-11-01 fetchMercurial: Don't fetch hashes we already haveEelco Dolstra1-5/+13
2017-11-01 Add fetchMercurial primopEelco Dolstra2-1/+75
E.g. $ nix eval '(fetchMercurial https://www.mercurial-scm.org/repo/hello)' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "82e55d328c8ca4ee16520036c0aaace03a5beb65"; revCount = 1; shortRev = "82e55d328c8c"; } $ nix eval '(fetchMercurial { url = https://www.mercurial-scm.org/repo/hello; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; })' { branch = "default"; outPath = "/nix/store/alvb9y1kfz42bjishqmyy3pphnrh1pfa-source"; rev = "0a04b987be5ae354b710cefeba0e2d9de7ad41a9"; revCount = 0; shortRev = "0a04b987be5a"; } $ nix eval '(fetchMercurial /tmp/unclean-hg-tree)' { branch = "default"; outPath = "/nix/store/cm750cdw1x8wfpm3jq7mz09r30l9r024-source"; rev = "0000000000000000000000000000000000000000"; revCount = 0; shortRev = "000000000000"; }
2017-10-30 Don't parse "x:x" as a URIEelco Dolstra2-2/+3
URIs now have to contain "://" or start with "channel:".