1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
Commit graph

435 commits

Author SHA1 Message Date
Silvan Mosberger 3d60440799 tests.nixpkgs-check-by-name: Remove error writer 2023-10-24 01:18:13 +02:00
Silvan Mosberger e58bc75444 tests.nixpkgs-check-by-name: Remove Nixpkgs struct
Isn't necessary anymore with the refactoring
2023-10-24 01:18:13 +02:00
Silvan Mosberger d65f3ddb89 tests.nixpkgs-check-by-name: Make reference check part of structural check 2023-10-24 01:18:13 +02:00
Silvan Mosberger 0475238ec0 tests.nixpkgs-check-by-name: Make structural check a global function 2023-10-24 01:18:12 +02:00
Silvan Mosberger 83b887504c tests.nixpkgs-check-by-name: Support for combining check results 2023-10-24 01:18:09 +02:00
Silvan Mosberger bb89ca72df tests.nixpkgs-check-by-name: Refactor 2023-10-24 01:15:58 +02:00
Silvan Mosberger 571eaed155 tests.nixpkgs-check-by-name: Intermediate ShardNonDir error 2023-10-24 01:15:58 +02:00
Silvan Mosberger b7ace0198c tests.nixpkgs-check-by-name: Intermediate InvalidShardName error 2023-10-24 01:15:58 +02:00
Silvan Mosberger 143e267ad2 tests.nixpkgs-check-by-name: Intermediate PackageNonDir error 2023-10-24 01:15:58 +02:00
Silvan Mosberger 935f82267a tests.nixpkgs-check-by-name: Intermediate CaseSensitiveDuplicate error 2023-10-24 01:15:58 +02:00
Silvan Mosberger e7d9cc96ed tests.nixpkgs-check-by-name: Intermediate InvalidPackageName error 2023-10-24 01:15:57 +02:00
Silvan Mosberger b011d53bda tests.nixpkgs-check-by-name: Intermediate IncorrectShard error 2023-10-24 01:15:57 +02:00
Silvan Mosberger 64f5eb616e tests.nixpkgs-check-by-name: Intermediate PackageNixNonExistent error 2023-10-24 01:15:57 +02:00
Silvan Mosberger e3979d14cd tests.nixpkgs-check-by-name: Intermediate PackageNixDir error 2023-10-24 01:15:57 +02:00
Silvan Mosberger 4f17b9367d tests.nixpkgs-check-by-name: Intermediate UndefinedAttr error 2023-10-24 01:15:57 +02:00
Silvan Mosberger b688da8189 tests.nixpkgs-check-by-name: Intermediate WrongCallPackage error 2023-10-24 01:15:57 +02:00
Silvan Mosberger 9a0ef88623 tests.nixpkgs-check-by-name: Intermediate NonDerivation error 2023-10-24 01:15:57 +02:00
Silvan Mosberger 4897b63ae6 tests.nixpkgs-check-by-name: Intermediate Symlink errors 2023-10-24 01:15:57 +02:00
Silvan Mosberger 9a3abc4383 tests.nixpkgs-check-by-name: Intermediate CouldNotParseNix error 2023-10-24 01:15:57 +02:00
Silvan Mosberger 96f6a350fa tests.nixpkgs-check-by-name: Intermediate PathInterpolation error 2023-10-24 01:15:56 +02:00
Silvan Mosberger a755aa7d02 tests.nixpkgs-check-by-name: Intermediate SearchPath error 2023-10-24 01:15:56 +02:00
Silvan Mosberger ed56d74c08 tests.nixpkgs-check-by-name: Intermediate path reference errors 2023-10-24 01:15:56 +02:00
Silvan Mosberger 37f8f6681c tests.nixpkgs-check-by-name: Intermediate error type refactoring prep
Currently the tool prints problems right as it is checking the code
without an intermediate error representation. However for various reasons
it would be beneficial to have an intermediate error type:
- It makes the code cleaner, having all errors in one place
- It allows printing the error in different ways, e.g. for a future
  --json mode

This commit prepares for an incremental refactoring for an intermediate
error/problem representation. Most notable is that we want to be able to collect
multiple errors/problems and not just exit on the first one.

We introduce the type alias CheckResult and CheckError (later renamed to
NixpkgsProblem), where CheckError allows collecting multiple
CheckErrors using the utility function flatten_check_results (later
renamed to check_result::sequence)

The write_check_result function is only temporarily introduced to help
refactoring, it's removed again in later commits.
2023-10-24 01:11:57 +02:00
Silvan Mosberger d3bf6133e8 tests.nixpkgs-check-by-name: Disallow empty all-packages.nix overrides
Only enabled with `--version v1`
2023-10-12 02:28:34 +02:00
Silvan Mosberger 23541bed72 tests.nixpkgs-check-by-name: Introduce --version 2023-10-12 02:28:09 +02:00
Silvan Mosberger fcaa408d00 tests.nixpkgs-check-by-name: auto-calling differentiation
Allows detecting whether attributes are overridden in all-packages.nix.
In a future commit we'll use this to detect empty arguments being set in
all-packages.nix and complain about that.
2023-10-12 02:27:55 +02:00
Silvan Mosberger f394f738fa tests.nixpkgs-check-by-name: Improve an error message 2023-10-12 02:27:13 +02:00
Silvan Mosberger 26cec0dbe3 tests.nixpkgs-check-by-name: Add custom argument test 2023-10-12 02:27:05 +02:00
Silvan Mosberger 6710bc250a tests.nixpkgs-check-by-name: Minor refactor
Allows a smaller diff for future changes
2023-10-12 02:27:02 +02:00
Silvan Mosberger 21d520fbf2 tests.nixpkgs-check-by-name: Minor Nix refactor 2023-10-12 02:24:54 +02:00
Madoura 12e7fc6923
llvmPackages_rocm -> rocmPackages.llvm 2023-10-09 16:38:51 -05:00
Matthieu Coudron 0ab2c96429 vimUtils: buildVimPluginFrom2Nix renamed to buildVimPlugin
the `from2Nix` suffix is a legacy from vim2nix but we dont use that anymore. It makes the name of the function unusual and long.
2023-09-27 19:08:38 +02:00
Silvan Mosberger 85d77bc124
Merge pull request #256913 from xfix/make-nixpkgs-check-by-name-tests-thread-safe
tests.nixpkgs-check-by-name: Make tests thread safe
2023-09-23 23:31:49 +02:00
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
figsoda 6728e7a9ca tests.nixpkgs-check-by-name: remove unused dependency
looks like we are not using rowan directly
2023-09-23 10:12:21 -04: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
Artturin 57040cc3eb tests.makeBinaryWrapper: fix cross test on aarch64-linux 2023-09-15 08:48:31 +03:00
Robert Hensing 04311ac3fa
Merge pull request #254763 from tie/nixpkgs-systems-equals
pkgs/top-level: use lib.systems.equals for crossSystem
2023-09-13 12:04:45 +02:00
Ivan Trubach d4063e0330 pkgs/top-level: use lib.systems.equals for crossSystem
Fixes otherwise equivalent systems being treated as different by
packages that compare `stdenv.*Platform`s using `==` operator.
2023-09-13 07:22:52 +03: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 d518eb94ee tests.nixpkgs-check-by-name: Fix for symlinked tempdirs
On Darwin, /tmp is sometimes a symlink to /private/tmp, which couldn't
be handled before:

    error: access to canonical path '/private/var/folders/xp/9_ry6h9x6l9gh_g32qspz0_40000gp/T/.tmpFbcNO0' is forbidden in restricted mode

This both fixes that and adds a test to make sure it can't happen again
2023-09-12 01:07:44 +02:00
Rahul Butani 0251e2645a llvmPackages_15.libcxx: fix the generated linker script
See:
 - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
 - 57c7bb3ec8
 - https://reviews.llvm.org/D133566

We can drop this patch in `llvmPackages_16`.

Fixes #214524.
2023-09-08 05:41:29 +03:00
Artturin 2d15039387 tests.cc-wrapper: add supported and move tests to subsets
filter out llvmPackages <=10 on aarch64-darwin, they're marked broken
and availableOn doesn't filter broken packages
2023-09-08 03:20:52 +03:00
Artturin bcd62ff9eb Revert "tests.cc-wrapper: filter unavailable gcc"
This reverts commit d33a309f2c9f85c28cb897e623503f210057a77a.

commit caused ofborg-eval to fail with

```
$ nix-build pkgs/top-level/release.nix -A tests.cc-wrapper.gcc10Stdenv.aarch64-darwin
       error: evaluation aborted with the following error message: 'cannot find attribute `tests.cc-wrapper.gcc10Stdenv''
```

on the 3 other platfomrs the attr is there
2023-09-07 22:36:16 +03:00
Artturin e0898be1c5 tests.cc-wrapper: filter unavailable gcc 2023-09-07 22:36:16 +03:00
Artturin 686516e0bc tests.cc-wrapper: filter out *MultiStdenv when not on and not building for linux and x86_64
they're only supported on x86_64-linux
2023-09-07 22:36:16 +03:00
Artturin 535447e289 tests.cc-wrapper: show command output on different line
this is much easier to read.
2023-09-07 22:36:16 +03:00
Artturin 1b6c3aed63 tests.cc-wrapper: show more prominently what cc is being tested
Show what libc is used, otherwise there's indication what libc is being
used. Ex in gccMultiStdenv.
2023-09-07 22:36:15 +03:00
Rahul Butani 626c8c3224 tests.cc-wrapper: rework the logic, test newer gcc stdenvs too
ignore `llvmPackages_latest`, it's an alias and it'll be a duplicate.
ignore `llvmPackages_git`, it's not supposed to be used in nixpkgs and
may be broken.
2023-09-07 22:36:07 +03:00
Rahul Butani 8b4f80741c tests.cc-wrapper-*: extend to `llvmPackages_{10,11,12,13,14,15,git} 2023-09-07 03:46:38 +03:00