Commit Graph

116 Commits

Author SHA1 Message Date
Jan Tojnar
98e84e79a9 makeHardcodeGsettingsPatch: Add simple tests 2022-12-19 17:38:56 +01:00
Robert Hensing
16f5747575
Merge pull request #175649 from Artturin/opt-in-structured-attrs
stdenv: support opt-in __structuredAttrs
2022-12-10 21:12:43 +01:00
Artturi
91d19a6e66
Merge pull request #204692 from Artturin/relative-links-fix-error
make-symlinks-relative: fix no such file or directory if output is cr…
2022-12-09 19:27:41 +02:00
Artturin
11b49fa791 tests.hooks.default-stdenv-hooks.make-symlinks-relative: init 2022-12-09 08:57:14 +02:00
Jörg Thalheim
09dcdf4e4e cue: test in tests.cue-validation 2022-12-08 22:19:23 +01:00
Artturin
18d00c5814 tests.stdenv: add some env attrset tests 2022-12-08 21:09:02 +02:00
Robert Hensing
c2f071abc2
Merge pull request #182250 from Artturin/fetchpatch2
fetchpatch2: init
2022-12-01 01:31:46 +00:00
Bernardo Meurer
43bf542ccd
tests.trivial-builders.linkFarm: init 2022-11-15 11:47:36 -05:00
Dennis Gosnell
7efd4aa67c
tests.coq.overrideCoqDerivation: add test 2022-08-29 14:46:20 +09:00
Artturin
41877098f3 fetchpatch2: init
allows us to use the new features of patchutils without having to reset
all fetchpatch hashes in nixpkgs

https://github.com/NixOS/nixpkgs/issues/32084
2022-07-20 22:47:14 +03:00
Robert Hensing
1e17bb943e
Merge pull request #164662 from infinisil/fetchurl-curlOpts-list
fetchurl: Allow passing curl options with spaces
2022-06-30 21:10:57 +02:00
Silvan Mosberger
588439e131 fetchurl: Add curlOptsList test 2022-06-30 19:49:54 +02:00
Robert Hensing
523eb4a181 pkgs.tests: Add regression test for #175196 2022-05-29 10:23:16 +02:00
Janne Heß
3673f148b3
Merge remote-tracking branch 'origin/staging-next'
* origin/staging-next: (62 commits)
  Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  openldap: fix cross-compilation
  makeBinaryWrapper: fix codesign on aarch64-darwin
  python3Packages.ldap: fix linking with openldap 2.5+
  Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)"
  wine: enable parallel build again
  pkgsi686Linux.gdb: fix formatting for 32-bit systems
  gtk4: Fix incorrect merge
  nixos/openldap: use upstream unit defaults
  openldap: update maintainers
  openldap: 2.4.58 -> 2.6.2
  Revert "Add mingwW64-llvm cross-system."
  lua: fix on darwin by using makeBinaryWrapper (#172749)
  python310Packages.python-mimeparse: execute tests
  pandas: fix darwin build
  gtk3: 3.24.33 -> 3.24.33-2022-03-11
  gtk4: patch fixing g-c-c crashes
  e2fsprogs: patch for CVE-2022-1304
  firefox-unwrapped: fix cross compilation
  rustc: expose correct llvmPackages for cross compile
  ...
2022-05-23 19:56:59 +02:00
Artturin
5a6a31e54d fetchzip: extraPostFetch -> postFetch && tests 2022-05-22 21:18:52 +03:00
Naïm Favier
3e385d9a82
makeBinaryWrapper: add comment 2022-05-12 15:23:38 +02:00
Naïm Favier
0d6bcb513b
makeBinaryWrapper: move into its own folder
The derivation is complex enough to warrant moving out of
all-packages.nix
2022-05-10 22:07:56 +02:00
Robert Hensing
93abb7bef7 tests.testers.nixosTest-example: move from tests.nixos-functions.nixosTest-test
And improve the test a bit, to assert correct wiring of `pkgs`.
2022-05-09 14:21:56 +02:00
github-actions[bot]
27e49cc5a4
Merge master into staging-next 2022-04-01 18:01:22 +00:00
Robert Hensing
6febb906a8 tests: Add pkgs-lib
Makes the following work

    ofborg build tests.pkgs-lib
2022-04-01 15:19:45 +02:00
K900
7e3c503257 build-support/writeTextFile: add test for weird file names 2022-03-10 13:30:46 +03:00
talyz
be2aa01de7
tests: Add test for makeWrapper
Co-authored-by: Janne Heß <janne@hess.ooo>
2022-02-02 20:08:26 +01:00
Robert Hensing
d75b85c5dc
Merge pull request #147690 from pasqui23/hosts
concatTextFile: init
2022-01-08 20:40:31 +01:00
Pasquale
5187d2cd8f
concatText: test now works 2021-12-30 13:12:34 +01:00
Robert Hensing
f6ff6c4ff4
Merge pull request #151411 from hercules-ci/pkgs-tests-fetch
pkgs.tests: Add fetcher tests so ofborg can run them
2021-12-20 18:33:50 +01:00
Robert Hensing
7195f7d5b9 pkgs.tests: Add fetcher tests so ofborg can run them 2021-12-20 13:13:07 +01:00
Tobias Bergkvist
f7b5083cb6 makeBinaryWrapper: Make tests discoverable to OfBorg
Move makeBinaryWrapper tests to pkgs.makeBinaryWrapper.passthru.tests, since OfBorg doesn't discover/skips the tests in the previous location.
2021-12-16 21:04:07 +01:00
Robert Hensing
9fb7d91888
Merge pull request #124556 from bergkvist/bergkvist/make-c-wrapper
Generate tiny compiled binary for wrapping executables
2021-12-10 00:45:30 +01:00
Kim Lindberger
0039b0b5a8
Merge pull request #144564 from jtojnar/php-overridable
php: Implement overrideAttrs that composes with buildEnv/withExtensions
2021-11-15 18:12:44 +01:00
Jan Tojnar
968d180452 php: Implement overrideAttrs that composes with buildEnv/withExtensions
Hopefully.

Also add a couple of tests to check that.
2021-11-14 23:05:48 +01:00
Dennis Gosnell
4d2b3b4d5a
Merge pull request #142825 from cdepillabout/buildDhallUrl
dhallPackages.buildDhallUrl: add function for easily building dhall remote imports
2021-11-08 13:44:37 +09:00
Robert Hensing
51f7c15df9 test.trivial-builders: Add test cases, fix test runner, rename
The writeStringReferencesToFile didn't handle non-unique references
to the same path correctly.
2021-11-01 00:06:03 +01:00
(cdep)illabout
9be3d05d7c tests.dhall.buildDhallUrl: add test 2021-10-25 15:04:50 +09:00
Tobias Bergkvist
b7d36b8d59 Add golden tests for make-binary-wrapper.
To run tests after cloning on linux, use the following:
nix-build pkgs/top-level/release.nix -A tests.make-binary-wrapper.x86_64-linux
2021-10-04 22:35:09 +02:00
deliciouslytyped
a71e906e3a trivial-builders: refactor writeTextFile to be overridable
This fixes #126344, specifically with the goal of enabling overriding the
checkPhase argument. See `design notes` at the end for details.

This allows among other things, enabling bash extension for the `checkPhase`.
Previously using such bash extensions was prohibited by the `writeShellScript`
code because there was no way to enable the extension in the checker.

As an example:

```nix
(writeShellScript "foo" ''
  shopt -s extglob
  echo @(foo|bar)
'').overrideAttrs (old: {
  checkPhase = ''
    # use subshell to preserve outer environment
    (
      export BASHOPTS
      shopt -s extglob
      ${old.checkPhase}
    )
  '';
})
```

This commit also adds tests for this feature to `pkgs/tests/default.nix`,
under `trivial-overriding`. The test code is located at
`pkgs/build-support/trivial-builders/test-overriding.nix`.

Design notes:
-------------

Per discussion with @sternenseemann, the original approach of just wrapping
`writeTextFile` in `makeOverridable` had the issue that combined with `callPackage`
in the following form, would shadow the `.override` attribute of the `writeTextFile`:

```nix
with import <nixpkgs>;
callPackage ({writeShellScript}: writeShellScript "foo" "echo foo")
```

A better approach can be seen in this commit, where `checkPhase` is moved
from an argument of `writeTextFile`, which is substituted into `buildCommand`,
into an `mkDerivation` argument, which is substituted from the environment
and `eval`-ed. (see the source)

This way we can simple use `.overideAttrs` as usual, and this also makes
`checkPhase` a bit more conformant to `mkDerivation` naming, with respect to
phases generally being overridable attrs.

Co-authored-by: sterni <sternenseemann@systemli.org>
Co-authored-by: Naïm Favier <n@monade.li>
2021-06-18 01:39:59 +02:00
Daniël de Kok
1da0b1dbc9
Merge pull request #122158 from danieldk/import-cargo-lock
rustPlatform.buildRustPackage: support direct use of Cargo.lock
2021-05-28 12:07:25 +02:00
Daniël de Kok
d3769e43c3 rustPlatform.importCargoLock: add test cases for importCargoLock 2021-05-28 08:01:28 +02:00
Robert Hensing
cc60f81e69 writeDirectReferencesToFile: init 2021-05-15 17:04:25 +02:00
sternenseemann
10b771c61a tests.haskell*: move into tests.haskell set
This will make it easier to add all haskell related tests to the haskell
hydra jobset without updating a list of tests in two places.
2021-05-01 22:58:35 +02:00
Matthieu Coudron
b3abdc9534
tests.vim: init (moved from vim-utils.nix) (#119467)
* tests.vim: init (moved from vim-utils.nix)

Moved tests from pkgs/misc/vim-plugins/vim-utils.nix to pkgs/test/vim.
Also reduced the amount of generated config:
- Make it possible to have an empty config when configured adequately
- removed default vim config when using native packages, it could be
  source of bugs see linked issues (syntax on overrides vim highlights)

Things to watch out for:
- if you set configure.beforePlugins yourself, you will need to add set nocompatible too not to lose it
- filetype indent plugin on | syn on is not enabled anymore by default for the vim-plug installer: I dont think we should override vim defualts, at least not here since it is shared with neovim. Also sometimes it's enabled before plugins (pathogen etc,) which is not consistent.


you can run the tests via
$ nix-build -A tests.vim
2021-04-21 12:55:05 +02:00
John Ericson
23f815f12c tests.cuda.cuda-sample_*: Init at supported CUDA toolkit versions
Since CUDA is unfree, we won't actually use this when testing Nixpkgs
officially. But I want to include this as they are useful for users of
Nixpkgs trying to set up / debug a CUDA environment.
2021-03-17 19:10:33 +00:00
John Ericson
5d2a20c93a buildRustCrateTests: Move to tests.buildRustCrate
I think it is preferable to separate the tests from the "real" packages.
2020-12-19 18:56:06 +00:00
John Ericson
8ddf5c6907 Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-11-28 18:10:38 +00:00
Joe Hermaszewski
7673eda11d haskell: Add documentationTarball to lib 2020-11-13 21:37:56 +01:00
Vladimír Čunát
89023c38fc
Recover the complicated situation after my bad merge
I made a mistake merge.  Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.

I reconstructed the "desired" state of staging-next tree by:
 - checking out the last commit of the problematic range: 4effe769e2
 - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
   merge commit and its revert from that range (while keeping
   reapplication from 4effe769e2)
 - merging the last unaffected staging-next commit (803ca85c20)
 - fortunately no other commits have been pushed to staging-next yet
 - applying a diff on staging-next to get it into that state
2020-10-26 09:01:04 +01:00
Vladimír Čunát
c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Aaron Janse
116ac11652 add test 2020-10-17 00:43:33 -07:00
Jan Tojnar
1882368e8a
Merge branch 'staging-next' into staging 2020-10-11 00:27:42 +02:00
Lily Ballard
03c9f6a647 installShellFiles: Add test suite 2020-10-08 15:08:40 -07:00
Dmitry Kalinkin
074f6d9d84
tests.texlive: init 2020-10-06 19:24:41 -04:00
Luka Blaskovic
0fc6280715 llvm_4: remove 2020-01-30 18:35:31 -05:00
Luka Blaskovic
0eafee8328 llvm_39: remove 2020-01-30 18:35:30 -05:00
Matthew Bauer
07db0b248c Merge remote-tracking branch 'obsidiansystems/work-on-multi-shellFor' 2020-01-17 18:00:27 -05:00
Jacquin Mininger
7d67db3919 shellFor: Refactor for consistency and cross
This makes it work like work-on-multi from Reflex Platform. In
particular, rather than making `.env` from `shellFor`, we make `.env`
the primitive, and `shellFor` works by combining together the arguments
of all the packages to `generic-builder` and taking the `.env` of the
resulting mashup-package.

There are 2 benefits of this:

1. The dependency logic is deduplicated. generic builder just concatted
   lists, whereas all the envs until now would sieve apart haskell and
   system build inputs. Now, they both decide haskell vs system the same
   way: according to the argument list and without reflection.
   Consistency is good, especially because it mean that if the build
   works, the shell is more likely to work.

2. Cross is handled better. For native builds, because the
   `ghcWithPackages` calls would shadow, we through both the regular
   component (lib, exe, test, bench) haskell deps and Setup.hs haskell
   deps in the same `ghcWithPackages` call. But for cross builds we use
   `buildPackages.ghcWithPackages` to get the setup deps. This ensures
   everything works correctly.
2020-01-17 10:46:29 -05:00
Will Dietz
a4d1e97e3d
tests.cc-wrapper-{clang,libcxx}-{8,9}: add stdenv tests for LLVM 8, 9 2019-09-19 15:03:09 -05:00
Austin Seipp
64f7cb24d5
all-packages/test: add gcc9Stdenv, cc-wrapper-gcc9
Follow up from #60860.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2019-05-07 17:21:31 -05:00
Matthieu Coudron
461cb3f9ed linux: added tests for the config 2019-01-28 09:07:24 +09:00
Jörg Thalheim
f12bd000b9
Merge pull request #49290 from krebs/nix-writers
get nix-writers into nixpkgs
2018-11-27 07:17:03 +00:00
lassulus
2d02cd7790 build-support writers: add tests 2018-11-27 07:08:13 +01:00
Robert Hensing
933c95c0f4 Add tests for pkgs.nixos and pkgs.nixosTest 2018-11-13 10:43:05 +01:00
Vladimír Čunát
3a09a4b579
Merge branch 'master' into staging
Hydra: ?compare=1480463
2018-09-24 21:18:23 +02:00
Will Dietz
0c459474f9 tests: add variants for llvm7 2018-09-23 13:30:17 -05:00
Dan Peebles
88a969d1b7 top-level/release.nix: add patchShebangs test
This is currently failing but nobody noticed!
2018-09-16 14:22:29 -04:00
Tuomas Tynkkynen
e94fcbcd01 pkgs/tests: Add test for LD_LIBRARY_PATH
The latest binutils upgrade silently broke this until it was fixed by
https://github.com/NixOS/nixpkgs/pull/43531.

So add a test.
2018-08-01 19:02:21 +03:00
Matthew Bauer
b98b4eac71 tests: add some cross tests 2018-07-21 17:00:05 -04:00
Matthew Bauer
4d141bd463 tests: move to attribute set 2018-05-10 23:58:12 -05:00