Commit Graph
173 Commits
Author SHA1 Message Date
Eelco Dolstra 1cd8458c28 tests/functional: Add source-paths tests
This has already been implemented in 1e709554d5
as a side-effect of mounting the accessors in storeFS. Let's test this so it
doesn't regress.

(cherry-picked from https://github.com/NixOS/nix/pull/12915)
2025-10-25 02:13:30 +03:00
David McFarland 645794b458 tests/functional/flakes/develop.sh: Add test for outputChecks stripping 2025-10-20 19:16:20 -03:00
Eelco Dolstra 1e709554d5 Merge pull request #14050 from NixOS/fix-fetch-to-store-caching
Fix fetchToStore caching
2025-10-06 19:39:41 +02:00
Farid Zakaria f596c9b8c3 shellcheck fix: tests/functional/flakes/show.sh 2025-09-29 09:16:29 -07:00
Farid Zakaria cb22518754 shellcheck fix: tests/functional/flakes/run.sh 2025-09-29 09:15:11 -07:00
Farid Zakaria 020f67a653 shellcheck fix: tests/functional/flakes/prefetch.sh 2025-09-29 09:14:41 -07:00
Jörg Thalheim 6721ef5feb Merge branch 'master' into fix-fetch-to-store-caching 2025-09-26 20:44:39 +02:00
Farid Zakaria 2a6724299a shellcheck fix: tests/functional/flakes/follow-paths.sh 2025-09-26 08:41:30 -07:00
Farid Zakaria 6fc8f04ecb shellcheck fix: tests/functional/flakes/flakes.sh 2025-09-26 08:41:30 -07:00
Farid Zakaria ac5615dd91 shellcheck fix: tests/functional/flakes/config.sh 2025-09-26 08:41:30 -07:00
Farid Zakaria 26a10453c3 shellcheck fix: tests/functional/flakes/check.sh 2025-09-26 08:41:30 -07:00
Farid Zakaria 9bf8e7b730 shellcheck fix: tests/functional/flakes/absolute-paths.sh 2025-09-26 08:41:30 -07:00
Eelco Dolstra 4b9735b761 Test against uncacheable paths
This is to test the non-functional property that most paths should be
cacheable. We've had frequent cases where caching broken but we didn't
notice.
2025-09-25 11:30:11 -04:00
Sergei Zimmerman a453a49043 tests: Tests for writeable dummy in-memory store 2025-09-21 13:36:31 +03:00
Seth FlynnandEelco Dolstra ecdda5798c nix flake check: Skip substitutable derivations
Since `nix flake check` doesn't produce a `result` symlink, it doesn't
actually need to build/substitute derivations that are already known
to have succeeded, i.e. that are substitutable.

This can speed up CI jobs in cases where the derivations have already
been built by other jobs. For instance, a command like

  nix flake check github:NixOS/hydra/aa62c7f7db31753f0cde690f8654dd1907fc0ce2

should no longer build anything because the outputs are already in
cache.nixos.org.

Based-on: https://github.com/DeterminateSystems/nix-src/pull/134
Based-on: https://gerrit.lix.systems/c/lix/+/3841
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-09-15 21:31:03 +02:00
Cole Helbling ed6ef7cdf4 Test that using --inputs-from with a flakeref that has a dir works
Will not pass until the next commit.
2025-09-08 09:00:59 +02:00
Cole Helbling 258d41bfb6 Test that dir is propagated from registry entry 2025-09-07 19:40:23 +02:00
Eelco Dolstra 14c001d613 Add a test for nix flake check building checks 2025-09-07 14:41:40 +02:00
Sergei Zimmerman 385e2c3542 meson: Apply formatting universally
Now that we have applied the [1] patch, the diff is much
nicer and less noisy.

[1]: https://www.github.com/mesonbuild/meson/pull/14861
2025-08-07 02:58:29 +03:00
Sergei ZimmermanandJade Lovelace 4333a9d5a8 ci: Collect code coverage in tests
This adds the necessary infrastructure to collect
code coverage in CI, which could be useful to look
at munually or track consistently via something like
codecov.

Co-authored-by: Jade Lovelace <lix@jade.fyi>
2025-08-04 23:50:02 +03:00
Eelco Dolstra 95437b90fc lockFlake(): When updating a lock, respect the input's lock file 2025-07-09 19:19:15 +02:00
Eelco Dolstra b415faceca Don't allow flake inputs to have both a flakeref and a follows
Having both doesn't make sense so it's best to disallow it. If this
causes issues we could turn into a warning.
2025-06-26 12:56:54 +02:00
Eelco DolstraandSebastian Ullrich 637c4f3ad7 Add tests for deep overrides
Taken from https://github.com/NixOS/nix/pull/6621.

Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2025-06-26 12:56:49 +02:00
Luc Perkins d6710b4c04 Merge remote-tracking branch 'upstream/master' into messages-present-tense 2025-06-18 08:24:23 -07:00
Vladimír Čunát 77f6b6532f tests: fixup with jq-1.8.0 2025-06-18 10:11:50 +02:00
Luc Perkins ab10fddc6e Rework future tense in user-facing messages 2025-06-12 09:07:36 -07:00
gustavderdracheandEelco Dolstra d80f0fb15a Add test for output warning to ensure stability
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-27 09:18:51 -04:00
Robert Hensing f18af849fe Merge pull request #13170 from MattSturgeon/fix/call-flake/rel-path
Use correct parent `outPath` for relative path inputs
2025-05-19 14:13:54 +02:00
Matt Sturgeon 72232bc28a tests/functional/flakes/non-flake-inputs: Test non-flake inputs having sourceInfo 2025-05-18 00:40:09 +01:00
Robert Hensing eaee0b4740 tests/function/flakes/relative-paths: Test #13164 2025-05-18 00:40:08 +01:00
Eelco Dolstra 824e0d51fe Test lock file contents more precisely 2025-05-13 10:40:24 +02:00
Eelco Dolstra d00682beb2 Backward compatibility hack for dealing with dir in URL-style flakerefs 2025-05-09 10:10:42 +02:00
Jörg Thalheim 6405d6822d tests/flakes: add regression test for resolving user flakes 2025-04-25 10:34:41 +02:00
Eelco Dolstra 68de26d38a lockFlake(): Allow registry lookups for the top-level flake
Fixes #13050.
2025-04-24 18:59:10 +02:00
Eelco Dolstra dda265f09a Reapply "Actually ignore system/user registries during locking"
This reverts commit 3b5f0d9fb3.
2025-04-24 17:33:27 +02:00
Jörg Thalheim 3b5f0d9fb3 Revert "Actually ignore system/user registries during locking"
This reverts commit 77d4316353.
2025-04-24 11:28:11 +02:00
Robert Hensing 2109a5a206 fix: Evaluate flake parent source without evaluating its outputs
This requires that we refer to the `sourceInfo` instead of the
`result`. However, `sourceInfo` does not create a chain of basedir
resolution, so we add that back with `flakeDir`.
2025-04-15 13:22:53 +02:00
Robert Hensing fc77a89d53 Merge pull request #12699 from rvl/subflake-locking-test
tests/functional/flakes: Add test case for subflake locking
2025-04-09 19:19:34 +02:00
Eelco Dolstra 77d4316353 Actually ignore system/user registries during locking
Something went wrong in #12068 so this didn't work. Also added a test.
2025-04-09 17:59:51 +02:00
Eelco Dolstra 67e957b636 Apply makeNotAllowedError to empty repos 2025-04-02 19:57:49 +02:00
Jörg Thalheim ca165f09c0 Merge pull request #12583 from ulucs/ulucs/skip-ifds
`nix flake show`: Skip IFDs instead of throwing
2025-03-27 11:40:49 +01:00
Uluc Sengil fcf5966488 skip ifds in nix flake show instead of throwing 2025-03-27 11:16:35 +01:00
Shahar "Dawn" Or 23c7a45a05 stack overflow is EvalBaseError 2025-03-20 17:43:20 +00:00
Rodney Lorrimar 1bc82d1c86 tests/functional/flakes: Add test case for subflake locking
This adds a test case where the lockfile of a relative path flake
dependency is updated.

It was reported by a user here: https://discourse.nixos.org/t/updating-local-subflakes-inputs-when-building-root-flake/61682

I think this test case relates to issue #7730.

Because the issue is not resolved, this test case would fail without
the `|| true` clause.
2025-03-20 13:28:05 +08:00
Eelco Dolstra 1293388039 Merge pull request #12544 from xokdvium/debugger-use-after-free
libexpr: Fix use-after-free of StaticEnv::up
2025-02-27 16:55:49 +01:00
Eelco Dolstra 14c9755462 nix flake archive: Recurse into relative path inputs
We can't ignore them entirely, since we do want to archive their
transitive inputs.

Fixes #12438.
2025-02-24 22:10:02 +01:00
Eelco Dolstra b4dfeafed5 nix flake archive: Skip relative path inputs
Fixes #12438.
2025-02-24 15:30:30 +01:00
Sergei Zimmerman 0d5004508f tests/functional: Add flake-based regression for debugger use-after-free
This is the simplest reproducer I have. It would be great to find
a repro without flakes, but I guess this should be ok for now.
2025-02-21 14:36:39 +00:00
Eelco Dolstra b813a764e0 Merge remote-tracking branch 'origin/master' into self-input-attrs 2025-02-10 17:01:19 +01:00
Eelco Dolstra 38f391444b Add a test for a flake referencing a flake that has inputs.self 2025-02-04 22:14:38 +01:00