aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-03-04Merge pull request #9861 from 9999years/colored-diff-in-lang-testseldritch horrors
Color `diff` output in `tests/functional/lang` tests (cherry picked from commit 1dc55c0f2f034bce6e3de4a5cda96d686b10a7f8) Change-Id: Ie9b3fc3446bd3caa0fd8885de88639516a2ff862
2024-03-04Merge pull request #9841 from obsidiansystems/float-speed-factoreldritch horrors
Convert `Machine::speedFactor` from a non-neg int to a non-neg float (cherry picked from commit 69d0ae27e376e7c7c4f237716b0149223b8a805a) Change-Id: I2afb5cf9e4fe1384985c58353946135c3d102b42
2024-03-04Merge pull request #9481 from ↵eldritch horrors
iFreilicht/disallow-nix-search-without-search-terms nix search: Disallow empty regex (cherry picked from commit 1c260fa6d1f47d83954792771d0614db163cc3bc) Change-Id: Iaaf3605c24a342fcb05d0b534a9f305533d3b5fa
2024-03-04Merge pull request #9632 from cole-h/nix-daemon-testingeldritch horrors
Use `nix daemon` in the test suite (cherry picked from commit e6e160a0758c0354ed810b0ec9846ed885adcc11) Change-Id: I537a25d3d48f609cd77b2c3a8ad68e87aebabfe8
2024-03-04Merge pull request #9785 from hercules-ci/test-substring-negativeeldritch horrors
tests/functional/lang: Test substring with negative length (cherry picked from commit 86156d05dd33f856d8804f89669a7fe9b81f1a0d) Change-Id: I2e2086027a43f8111ba5068ac16590eaa0b798d4
2024-03-04Merge pull request #9747 from awakesecurity/mz/fix-quadratic-splitStringeldritch horrors
Fix performance of builtins.substring for empty substrings (cherry picked from commit b2deff1947c2fe57fdbf1a472eb9003eb407f8d3) Change-Id: I4ddfc8d26a4781c9520fff9807849a073ee7bed8
2024-03-04Merge pull request #8043 from bobvanderlinden/pr-shell-enveldritch horrors
nix: develop: use SHELL from rc script (cherry picked from commit 0d55d660d5ea081630aa9606b047eb755cff1528) Change-Id: I83be6c63b282d7f01a0defa78d9e787c77f1f02d
2024-03-04Merge pull request #9648 from cole-h/nix-shell-orderingeldritch horrors
nix shell: reflect command line order in PATH order (cherry picked from commit b91c935c2faf08ced2c763dcd2a831f26d84fa86) Change-Id: If16c120bb74857c2817366e74e5b0877eb997260
2024-03-04Merge pull request #9662 from shlevy/flat-fixed-references-asserteldritch horrors
Improve error message for fixed-outputs with references. (cherry picked from commit ff6de4a9ee6c3862db9ee5f09ff9c3f43ae7a088) Change-Id: I733c49760b9a3f1b76a6bece3b250b8579cd6cac
2024-03-04Merge pull request #9617 from 9999years/stack-overflow-segfaulteldritch horrors
Fix segfault on infinite recursion in some cases (cherry picked from commit bf1b294bd81ca76c5ec9fe3ecd52196bf52a8300) Change-Id: Id137541426ec8536567835953fccf986a3aebf16
2024-03-04Merge pull request #9637 from 9999years/fix-logging-test-on-macoseldritch horrors
Fix `logging.sh` test on macOS (cherry picked from commit 94a03a810e948f65776c3386d9a5234db551dc9e) Change-Id: I65dde18ee53ccded31790e0cf1f836c3ad6dc492
2024-03-04Merge pull request #9619 from 9999years/remove-blank-lines-in-errorseldritch horrors
Remove some blank lines from stack traces (cherry picked from commit cea83544362bd6426e9bc0b7dd0d611c19b0e3fd) Change-Id: Ic1af8b09e9994d3c69fd3b37ae47a4bb786a15a1
2024-03-04Merge pull request #4093 from matthewbauer/eval-systemeldritch horrors
Add eval-system option (cherry picked from commit 071dbbee33af9f27338c3e53e4ea067dbfa14010) Change-Id: Ia81358c8cfb60241da07a4d0e84b9ee62a18a53f
2024-03-04Merge pull request #9589 from ↵eldritch horrors
obsidiansystems/floating-content-addressing-derivations-eval-store Fix building CA derivations with and eval store (cherry picked from commit dfc0cee7024a082d90a4f68296f55a82dfd52126) Change-Id: I28feb5a36d4fe75f0ed3e3e2db6eb56b67d0f371
2024-03-04Merge pull request #9555 from 9999years/positions-in-errorseldritch horrors
Pass positions when evaluating (cherry picked from commit c8458bd731eb1c74159bebe459ea00165e056b65) Change-Id: I1b4a5d58973be6264ffdb23b4492da200fdb71be
2024-03-04Merge pull request #9529 from wh0/patch-1eldritch horrors
tests: avoid a chroot store without sandbox support (cherry picked from commit 5910140f252280f6be429d1cb5e91e69999f5b43) Change-Id: Ic2255261334012f36a465a96073f50669952dc26
2024-03-04Merge pull request #9233 from bouk/bouk/apply-config-innereldritch horrors
config: add included files into parsedContents before applying (cherry picked from commit 82359eba6b692691ef08a71196ef25a61bc4d3d3) Change-Id: Idde3177010fec7b8bafe6088c3c23d5caf491845
2024-03-04Merge pull request #9465 from obsidiansystems/build-direldritch horrors
Use `buildprefix` in a few more places (cherry picked from commit b6a3fde6b7a416929553e6be36fc991680ddf9ef) Change-Id: I2790663fa9f8242ac2db6582b7e421d2fdf42942
2024-03-04fix: `nlohmann::adl_serializer` for `std::optional` (#9147)eldritch horrors
This allows templates such as `NLOHMANN_DEFINE_TYPE_*` templates and other generators with things like `std::vector<std::optional<T>>`. Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems> (cherry picked from commit 02bd821f2e71372d31bbe6700bd68086cc2ee70a) Change-Id: I8b0ebcf2af4226610dadd565962f2d2327415a03
2024-03-04Merge pull request #9257 from Artturin/nixenvjsondrvpatheldritch horrors
`nix-env --query`: fix `--json` ignoring `--drv-path` (cherry picked from commit 516e7ddc41f39ff939b5d5b5dc71e590f24890d4) Change-Id: I84b5bccea9d0383e2e74544743b703942e7be547
2024-03-04Merge pull request #9395 from nbraud/buitlinseldritch horrors
builtins.concatMap: Fix typo in error message (cherry picked from commit 4292d997568eb30503e287f98e24821ff0bc2816) Change-Id: Ia33d1b02e41f699ef0c8c2d6487c9f70b2cc8cf4
2024-03-04Merge pull request #7348 from thufschmitt/dont-use-vlaseldritch horrors
Remove the usage of VLAs in the code (cherry picked from commit ac4431e9d016e62fb5dc9ae36833bd0c6cdadeec) Change-Id: Ifbf5fbfc2e27122362a2aaea4b62c7cf3ca46b1a
2024-03-04Fix `boost::bad_format_string` exception in `builtins.addErrorContext` (#9291)eldritch horrors
* Fix boost::bad_format_string exception in builtins.addErrorContext The message passed to addTrace was incorrectly being used as a format string and this this would cause an exception when the string contained a '%', which can be hit in places where arbitrary file paths are interpolated. * add test (cherry picked from commit 61d6fe059e959455e156c1d57bb91155d363e983) Change-Id: Idd671127a9c1ccc8b94e58e727632fcc064f3cbe
2024-03-04Merge pull request #9225 from drupol/nixpkgs-pr-107251/make-gnutar-reproducibleeldritch horrors
fix: make sure `tar` reproducibility flags are set (cherry picked from commit 28dddde0aca978114eaef00a14a2ab14b2459f4a) Change-Id: I57c4d4374f5195099e6d763827b6d7d05785b3a8
2024-03-04Merge pull request #9288 from edolstra/fix-nar-access-testeldritch horrors
Fix nar-access test on macOS (cherry picked from commit e9a857e4189241d23111e18e284ab7ac9d56b798) Change-Id: I2fd2ec3e6ccb88350bdcd2ba15ccfd77275399c9
2024-03-04Merge pull request #9247 from obsidiansystems/derivation-test-with-fileseldritch horrors
Turn derivation unit tests into unit characterization tests (cherry picked from commit a6e587923c9d5d716fe0f0049bed96d1cc210bff) Change-Id: Ia2a2e65aabfee8d5d52142b8fdaacbae4a27242c
2024-03-04Merge pull request #9216 from obsidiansystems/addDrvOutputDependencies-preeldritch horrors
Add `builtins.addDrvOutputDependencies` (cherry picked from commit a58d7f143ec995a45745c2176bfebcc3e011db58) Change-Id: Ia5a1790bf29dfaf29287cc35cdae6b6d650e7a83
2024-03-04Merge pull request #8470 from ncfavier/shebang-single-quoteseldritch horrors
nix-shell: support single quotes in shebangs, fix whitespace parsing (cherry picked from commit 3b99c6291377cbd22607896af9dfafa857d2f2dc) Change-Id: I2a431b21c3467eefa1ef95d5a36d672f45b6937a
2024-03-04Merge pull request #6223 from obsidiansystems/worker-proto-with-versioneldritch horrors
Give `nix daemon` and `nix-store --serve` protocols separate serializers with version info (cherry picked from commit 8b68bbb77745fda0d14939b6c23d31cc89da41ce) Change-Id: Ia3d3b9fbaf9f0ae62ab225020b7d14790e793655
2024-03-04Merge pull request #9157 from obsidiansystems/protocol-versionsRobert Hensing
Add protocol versions to `{Worker,Serve}Proto::*Conn` (cherry picked from commit 4d17c59d8d059a5b39f1d1da2b58f2ec8da44861) Change-Id: I497af39deb792e50c157a1305d8c9e722798740b
2024-03-04Merge pull request #9168 from obsidiansystems/fix-lang-tests-read-onlyeldritch horrors
Fix language tests a bit (cherry picked from commit e92cac789fc84b116a03db04a5f7de8df48e34cd) Change-Id: I527e94c5af0921ff2559ce5a4ac7635be791c22e
2024-03-04Merge pull request #9167 from obsidiansystems/pre-overhaul-completionseldritch horrors
Improve tests and docs prior to refactoring completions (cherry picked from commit 5442d9b47298389918d1f38d20f768a80ffc2369) Change-Id: Ief99ac2cd9c92981a9a522d15b9c3daf99182c9d
2024-03-04Merge pull request #9137 from obsidiansystems/serve-protocoleldritch horrors
Introduce separate Serve protocol serialisers (cherry picked from commit d070d8b7460f412a657745698dba291c66792402) Change-Id: Ibcc8639e8997bcd07f7a5318330a147bcadc411b
2024-03-04Merge pull request #9099 from obsidiansystems/common-protoeldritch horrors
Factor out bits of the worker protocol to use elsewhere (cherry picked from commit 4b1a97338f517f45e6169d3d8845c5caa5724e97) Change-Id: If93afa0f8b1cf9b0e705b34fa71e6fd708752758
2024-03-04Merge pull request #9106 from Ericson2314/positive-source-filteringeldritch horrors
Use positive source filtering for the standalone functional tests job and Perl bindings (cherry picked from commit 6b6bd9003062c86a49d4384381941cf57f269c45) Change-Id: I896be67654f893d543ed6beb5d0d0d6c6d36e027
2024-03-04Merge pull request #8905 from hercules-ci/no-unknown-locationeldritch horrors
Don't print unknown locations unless requested for dev purposes (cherry picked from commit 3dd4475826dff8052fef42d4600b61e6b91950ac) Change-Id: I04a91277d1d9d09f5c1bf4a28fc99f0702b161e5
2024-03-04Merge pull request #9096 from NixOS/dont-rebuild-twice-on-cieldritch horrors
Don't run the tests that require building if we're not building (cherry picked from commit 8cfa582f436db8066eff74cb084990367e014ce6) Change-Id: I6085ca6107349669407340d7a5e52639a2febc90
2024-03-04Merge pull request #9098 from obsidiansystems/test-protoeldritch horrors
Enable most of the third `BuildResult` worker protocol test (cherry picked from commit d344c112f772282bacacd4c66a75df4022d16e12) Change-Id: I7b2b72aa84c19a6069f9c12128d901262db6f91c
2024-03-04Merge pull request #9094 from obsidiansystems/test-protoeldritch horrors
Test the rest of the worker protocol serializers (cherry picked from commit 2f1c16dfa2378fd8616bff1b9b7cd0b4d42af69b) Change-Id: Idfd72d32b21d14a260e02f65531d287cef7464d2
2024-03-04Merge pull request #8923 from obsidiansystems/test-protoeldritch horrors
Unit test some worker protocol serializers (cherry picked from commit c6faef61a6f31c71146aee5d88168e861df9a22a) Change-Id: I99e36f5f17eb7642211a4e42a16b143424f164b4
2024-01-21Fix symlink handlingEelco Dolstra
This restores the symlink handling behaviour prior to 94812cca98fbb157e5f64a15a85a2b852d289feb. Fixes #9298. (cherry picked from commit 31ebc6028b3682969d86a7b39ae87131c41cc604)
2024-01-11Merge branch '2.18-maintenance' into ifd-buildStore-2.18Shea Levy
2024-01-11Build IFD in the build store when using eval-store.Shea Levy
Previously, IFDs would be built within the eval store, even though one is typically using `--eval-store` precisely to *avoid* local builds. Because the resulting Nix expression must be copied back to the eval store in order to be imported, this requires the eval store to trust the build store's signatures. (cherry picked from commit c3942ef85ffbd83391410fbf012f1de366d2463c)
2024-01-11remote-store test: Break out IFD expression into a separate fileShea Levy
(cherry picked from commit 9cb287657bec5a969d8bb1678d598d9fa820e60b)
2023-12-05Add missing `-pthread` for test support librariesJohn Ericson
This is good in general (see how the other libraries also have long had it, since 49fe9592a47e7819179c2de4fd6068e897e944c7) but in particular needed to fix the NetBSD build. (cherry picked from commit b23273f6a29c725646b3523b1c35a0ae4a84ef61)
2023-12-01Move tests to separate directories, and documentJohn Ericson
Today, with the tests inside a `tests` intermingled with the corresponding library's source code, we have a few problems: - We have to be careful that wildcards don't end up with tests being built as part of Nix proper, or test headers being installed as part of Nix proper. - Tests in libraries but not executables is not right: - It means each executable runs the previous unit tests again, because it needs the libraries. - It doesn't work right on Windows, which doesn't want you to load a DLL just for the side global variable . It could be made to work with the dlopen equivalent, but that's gross! This reorg solves these problems. There is a remaining problem which is that sibbling headers (like `hash.hh` the test header vs `hash.hh` the main `libnixutil` header) end up shadowing each other. This PR doesn't solve that. That is left as future work for a future PR. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> (cherry picked from commit 91b6833686a6a6d9eac7f3f66393ec89ef1d3b57) (cherry picked from commit a61e42adb528b3d40ce43e07c79368d779a8b624)
2023-12-01Put functional tests in `tests/functional`John Ericson
I think it is bad for these reasons when `tests/` contains a mix of functional and integration tests - Concepts is harder to understand, the documentation makes a good unit vs functional vs integration distinction, but when the integration tests are just two subdirs within `tests/` this is not clear. - Source filtering in the `flake.nix` is more complex. We need to filter out some of the dirs from `tests/`, rather than simply pick the dirs we want and take all of them. This is a good sign the structure of what we are trying to do is not matching the structure of the files. With this change we have a clean: ```shell-session $ git show 'HEAD:tests' tree HEAD:tests functional/ installer/ nixos/ ``` (cherry picked from commit 68c81c737571794f7246db53fb4774e94fcf4b7e)
2023-10-02Revert "Adapt scheduler to work with dynamic derivations"John Ericson
This reverts commit 5e3986f59cb58f48186a49dcec7aa317b4787522. This un-implements RFC 92 but fixes the critical bug #9052 which many people are hitting. This is a decent stop-gap until a minimal reproduction of that bug is found and a proper fix can be made. Mostly fixed #9052, but I would like to leave that issue open until we have a regression test, so I can then properly fix the bug (unbreaking RFC 92) later. (cherry picked from commit 8440afbed756254784d9fea3eaab06649dffd390)
2023-10-01pathExists: isDir when endswith /.Robert Hensing
(cherry picked from commit f8a3893e8d77ce4a6e23719a0b2d88464cb84b9c)
2023-09-20Re-enable systemd-nspawn testCole Helbling
It was disabled in c6953d1ff62fb6dc4fbd89c03e7949c552c19382 because a recent Nixpkgs bump brought in a new systemd which changed how systemd-nspawn worked. As far as I can tell, the issue was caused by this upstream systemd commit: https://github.com/systemd/systemd/commit/b71a0192c040f585397cfc6fc2ca025bf839733d Bind-mounting the host's `/sys` and `/proc` into the container's `/run/host/{sys,proc}` fixes the issue and allows the test to succeed. (cherry picked from commit 883092e3f78d4efb1066a2e24e343b307035a04c)