Commit Graph

11 Commits

Author SHA1 Message Date
Silvan Mosberger
2dd7f0e8b9 tests.nixpkgs-check-by-name: Use NIX_PATH for extra test files
This avoids the need for a bunch of Rust code, but also enables us to
fairly easily make all the Nixpkgs tests evaluatable within the
nix-shell
2024-01-17 10:43:12 +01:00
Silvan Mosberger
64ad8b6836 tests.nixpkgs-check-by-name: Limit source files
To prevent more rebuilds than necessary
2024-01-17 10:40:03 +01:00
Silvan Mosberger
3ebd239cd5 tests.nixpkgs-check-by-name: Test on the current Nixpkgs
This test actually fails right now
2024-01-16 21:15:42 +01:00
Silvan Mosberger
91b754edff tests.nixpkgs-check-by-name: Minor Nix build refactor 2024-01-16 21:15:40 +01:00
Silvan Mosberger
aa7dd0b596 tests.nixpkgs-check-by-name: Improve lib path handling in tests
nix-build failed because the tests assume to run in a CWD equal to the
project root, which is not the case in the derivation build.

This commit fixes it by not using hacky `..` references to paths,
and instead uses NIX_PATH for all implicit Nix testing path
dependencies.

Also the root of the `lib` path gets passed in from the `default.nix`
file, so all the relative path handling is done by Nix during evaluation
already, and in the Nix store when possible.
2024-01-15 18:34:16 +01:00
Hariom Narang
ca97497bfd made EXPR_PATH point to local instead of store
- we need this behavior in dev shell
- the main build still uses the store file
2023-11-21 01:11:06 +05:30
Hariom Narang
437b2054f4 pass eval.nix as a file instead of expression
- passing it as expression gives large error messages
  which are not very readable
- this commits puts the file in nix-store
  and patches the final program to have access to
  the path to the file as env.
- We simply pass this file to nix-instantiate
2023-11-14 15:05:45 +05:30
Konrad Borowski
9efc0c0991 tests.nixpkgs-check-by-name: make tests thread safe
This uses a mutex to make sure that functions that read environment
don't read incorrect values.
2023-09-23 21:24:44 +02:00
Silvan Mosberger
1fe58cb050 tests.nixpkgs-check-by-name: Fix non-reproducible test failures
This was an oversight in https://github.com/NixOS/nixpkgs/pull/254435
2023-09-23 00:09:26 +02:00
Silvan Mosberger
9c9a7e0082 tests.nixpkgs-check-by-name: Fix with parallel tests
We seem to have enough tests to run into this now:

    error: creating symlink from '/private/tmp/nix-build-nixpkgs-check-by-name.drv-0/source/test-tmp/var/nix/gcroots/profiles' to '/private/tmp/nix-build-nixpkgs-check-by-name.drv-0/source/test-tmp/var/nix/profiles': File exists
2023-09-12 01:07:47 +02:00
Silvan Mosberger
271eb02995 pkgs/test/nixpkgs-check-by-name: init
Adds an internal CLI tool to verify Nixpkgs to conform to RFC 140.
See pkgs/test/nixpkgs-check-by-name/README.md for more information.
2023-08-29 16:17:54 +02:00