aboutsummaryrefslogtreecommitdiff
path: root/tests/dependencies.sh
AgeCommit message (Collapse)Author
2023-03-08Harden tests' bashJohn Ericson
Use `set -u` and `set -o pipefail` to catch accidental mistakes and failures more strongly. - `set -u` catches the use of undefined variables - `set -o pipefail` catches failures (like `set -e`) earlier in the pipeline. This makes the tests a bit more robust. It is nice to read code not worrying about these spurious success paths (via uncaught) errors undermining the tests. Indeed, I caught some bugs doing this. There are a few tests where we run a command that should fail, and then search its output to make sure the failure message is one that we expect. Before, since the `grep` was the last command in the pipeline the exit code of those failing programs was silently ignored. Now with `set -o pipefail` it won't be, and we have to do something so the expected failure doesn't accidentally fail the test. To do that we use `expect` and a new `expectStderr` to check for the exact failing exit code. See the comments on each for why. `grep -q` is replaced with `grepQuiet`, see the comments on that function for why. `grep -v` when we just want the exit code is replaced with `grepInverse, see the comments on that function for why. `grep -q -v` together is, surprise surprise, replaced with `grepQuietInverse`, which is both combined. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2020-05-12tests/binary-cache.sh: Improve incomplete closure testEelco Dolstra
Issue #3373.
2020-03-24Pretty-print 'nix why-depends' / 'nix-store -q --tree' outputEelco Dolstra
Extracted from 678301072f05b650dc15c5edb4c25f08f0d6cace.
2011-10-10* Refactoring: remove unnecessary variables from the tests.Eelco Dolstra
2009-03-18* Acquire the locks on the output paths before trying to run the buildEelco Dolstra
hook. This fixes a problem with log files being partially or completely filled with 0's because another nix-store process truncates the log file. It should also be more efficient.
2008-06-09* Merged the no-bdb branch (-r10900:HEADEelco Dolstra
https://svn.nixos.org/repos/nix/nix/branches/no-bdb).
2006-03-01* Add a test for nix-log2xml.Eelco Dolstra
2006-03-01* Simplification.Eelco Dolstra
2006-03-01* Make it easy to run individual tests from the command line.Eelco Dolstra
2006-02-22* Aha!Eelco Dolstra
2006-02-22* WTF?Eelco Dolstra
2006-02-22* Check whether "nix-store -q --graph" generates a valid dot graph.Eelco Dolstra
* Test "nix-store -q --tree" as well.
2005-12-13* Change `referer' to `referrer' throughout. In particular, theEelco Dolstra
nix-store query options `--referer' and `--referer-closure' have been changed to `--referrer' and `--referrer-closure' (but the old ones are still accepted for compatibility).
2005-02-09* Propagate the deriver of a path through the substitute mechanism.Eelco Dolstra
* Removed some dead code (successor stuff) from nix-push. * Updated terminology in the tests (store expr -> drv path). * Check that the deriver is set properly in the tests.
2005-01-25* In nix-store: added query `--referers-closure' that returns theEelco Dolstra
closure of the referers relation rather than the references relation, i.e., the set of all paths that directly or indirectly refer to the given path. Note that contrary to the references closure this set is not fixed; it can change as paths are added to or removed from the store.
2005-01-25* In nix-store: change `--build' back to `--realise'. Also broughtEelco Dolstra
back the query flag `--force-realise'. * Fixed some of the tests.
2005-01-19* Change extension `.store' to `.drv'.Eelco Dolstra
* Re-enable `nix-store --query --requisites'.
2004-05-04* Another test.Eelco Dolstra