Commit graph

2569 commits

Author SHA1 Message Date
Eelco Dolstra
06b686b62d Handle tarballs that don't consist of a single top-level directory
Fixes #4785 (top-level directories are no longer merged into one).

Fixes #10983 (top-level non-directories are no longer discarded).
2024-07-26 20:24:58 +02:00
Robert Hensing
6ec123ad6b
Merge pull request #11131 from rhendric/rhendric/pipe-operators
libexpr: experimental pipe operators
2024-07-25 16:58:43 +02:00
Robert Hensing
76f04b4146
Merge pull request #11111 from NixOS/grep-safety-AGAIN
Grep newline safety
2024-07-25 16:30:33 +02:00
Robert Hensing
baa28159d3
Update tests/functional/test-infra.sh
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-07-25 15:38:02 +02:00
John Ericson
36252fed6b
Merge pull request #11176 from obsidiansystems/flake-test-group
Put flake functional tests in their own group
2024-07-25 02:41:11 -04:00
Robert Hensing
6662c9012d
Merge pull request #11177 from obsidiansystems/skip-exit-code
Change skipped test error code from 99 to 77
2024-07-25 06:59:18 +02:00
John Ericson
90f7f2139e
Merge pull request #11115 from NixOS/doc-derivation
Document builtins.derivation
2024-07-25 00:21:53 -04:00
John Ericson
3b49f7a143
Deduplicate our many package.nix a bit (#11175)
- They should all be built in parallel

- They should all use strict deps by default
2024-07-25 03:12:39 +00:00
John Ericson
dcbe2453f5 Change skipped test error code from 99 to 77
Meson uses a venerable GNU convention described in
https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
in which:

> When no test protocol is in use, an exit status of 0 from a test
> script will denote a success, an exit status of 77 a skipped test, an
> exit status of 99 a hard error, and any other exit status will denote
> a failure.

77 is thus what we want, not 99.
2024-07-24 22:36:43 -04:00
John Ericson
f4915af71c Put flake functional tests in their own group
This is a nice thing to have, and it made it easier to work on the
Meson-ifcation of these functional tests too.
2024-07-24 22:31:37 -04:00
Valentin Gagarin
e062021314
fix NIX_PATH for real (#11079)
* fix NIX_PATH overriding

- test restricted evaluation
- test precedence for setting the search path

Co-authored-by: Robert Hensing <robert@roberthensing.nl>
Co-authored-by: John Ericson <git@JohnEricson.me>
2024-07-24 21:17:15 +00:00
Ryan Hendrickson
e086d5d899 libexpr: experimental pipe operators 2024-07-24 13:17:28 -04:00
Robert Hensing
4457cebe05
Update comment in tests//vars-and-functions.sh
Co-authored-by: tomberek <tomberek@users.noreply.github.com>
2024-07-23 10:24:18 +02:00
Eelco Dolstra
babfd0cd99
Merge pull request #11150 from hercules-ci/issue-11141-broken-sp-corrector
Fix issue #11141 broken stack pointer corrector
2024-07-22 19:59:46 +02:00
John Ericson
046cc8cbb3
Merge pull request #11156 from obsidiansystems/fix-bsd-pthread
Fix some BSD builds missing pthread functions
2024-07-22 13:58:41 -04:00
John Ericson
00fd180a79
Merge pull request #11153 from nix-windows/wine-ci
Run unit tests with wine
2024-07-22 13:35:32 -04:00
John Ericson
d3cee8160c Add missing threads deps 2024-07-22 11:46:54 -04:00
Robert Hensing
f2e0cecf34 tests/functional/lang-gc: Disable for now 2024-07-22 17:46:08 +02:00
Eelco Dolstra
d08bb025e1
Merge pull request #11043 from hercules-ci/assert-eq
`assert`: Report why values aren't equal
2024-07-22 17:34:28 +02:00
John Ericson
eea63d5f99 Run unit tests with wine
Fix #10547

The tests do not all run successfully, but that is a separate issue.
2024-07-22 10:31:26 -04:00
John Ericson
dc6dbbc1a5 Test exes do not need dev outputs 2024-07-22 10:26:05 -04:00
Eelco Dolstra
40f80e1b5c
Merge pull request #11142 from detroyejr/fix-alias-flags
Allow flag aliases
2024-07-22 15:53:41 +02:00
Robert Hensing
380becf0db Fix #11141 broken sp corrector 2024-07-22 14:52:08 +02:00
Robert Hensing
584f8cb065
Merge pull request #11120 from tweag/early-string-cutoff
parser: Remove empty multiline string parts earlier
2024-07-20 19:10:50 +02:00
detroyejr
d54dfbf879 addFlag: test that alias flags are allowed 2024-07-19 15:56:54 -04:00
Silvan Mosberger
0c91bb97e5 parser: Remove empty multiline string parts earlier
Makes parsing more consistent and is a super minor optimisation

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-07-19 00:43:44 +02:00
Farid Zakaria
57399bfc0e
Refactor unix domain socket store config (#11109)
Following what is outlined in #10766 refactor the uds-remote-store such
that the member variables (state) don't live in the store itself but in
the config object.

Additionally, the config object includes a new necessary constructor
that takes a scheme & authority.

Tests are commented out because of linking errors with the current config system.
When there is a new config system we can reenable them.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-07-17 23:32:27 -04:00
Eelco Dolstra
1e1a8e8ad1
Merge pull request #11058 from hercules-ci/more-nix-shell
Make `#!nix-shell` arguments and options relative to script
2024-07-17 21:52:34 +02:00
Eelco Dolstra
b23da1ceca
Merge pull request #11100 from NixOS/pretty-print-idempotent
Pretty print idempotently
2024-07-17 21:35:27 +02:00
Eelco Dolstra
05751de32b
Merge pull request #10931 from hercules-ci/test-run-and-shell-envs
Test the `run` and `shell` envs for stray variables
2024-07-17 21:21:14 +02:00
Robert Hensing
da3eff60bc printList: Force item before determining whether to print multi-line 2024-07-17 13:42:05 +02:00
Robert Hensing
a0635a80b2 printAttrs: Force item before determining whether to print multi-line 2024-07-17 13:42:05 +02:00
Robert Hensing
ece334b532 tests/functional/repl: Characterize side effecting print behavior
Reported on matrix by aleksana:
https://matrix.to/#/!VRULIdgoKmKPzJZzjj:nixos.org/$7wZp5lUDTd-_u6MYo8kWWcysjtqTiQqP8dLI0RDNVVM?via=nixos.org&via=matrix.org&via=nixos.dev
2024-07-17 13:42:05 +02:00
Silvan Mosberger
9fae50ed4b Add parser test for indented strings
So that in the next commit we can see what changes about this test
2024-07-17 02:43:47 +02:00
Las Safin
5b6a21acc5
Avoid casting function pointer in libutil test support
Casting function pointers seems to be almost always UB.
See https://stackoverflow.com/questions/559581/casting-a-function-pointer-to-another-type

Fixed by doing the casting of `void*` to `std::string*` inside the function instead.

Caught by UBSan.
2024-07-16 22:01:34 +00:00
Robert Hensing
7dce074634 tests/functional/lang: Avoid /usr/bin/env for sandbox 2024-07-16 22:43:56 +02:00
Robert Hensing
f9a1d6b018 tests/functional/lang: Add post processing and remove certain line numbers 2024-07-16 17:36:30 +02:00
Robert Hensing
74698d54c8 Document builtins.derivation 2024-07-16 17:20:09 +02:00
John Ericson
4bbadba83a
Merge pull request #11108 from obsidiansystems/remote-store-constructors
Ensure we can construct remote store configs in isolation
2024-07-15 22:51:22 -04:00
Robert Hensing
41a03738d6 tests/functional: Also keep plain grep calls safe from newlines 2024-07-16 01:54:12 +02:00
Robert Hensing
644b97ce25 tests/functional: Make our grep* helpers reject newlines in the query
Newlines behave like *OR*; not "and then".
2024-07-16 01:41:22 +02:00
Robert Hensing
f2df3f0c6c tests/vars-and-functions: Add callerPrefix helper 2024-07-16 01:40:33 +02:00
Robert Hensing
783a8341ee tests/functional: Support negative codes in expect, expectStderr 2024-07-16 01:32:54 +02:00
John Ericson
808082ea03 Ensure we can construct remote store configs in isolation
Progress towards #10766

I thought that #10768 achieved, but when I went to use this stuff (in
Hydra), turns out it did not. (Those `using FooConfig;` lines were not
working --- they are so finicky!) This PR gets the job done, and adds
some trivial unit tests to make sure I did what I intended.

I had to add add a header to expose `SSHStoreConfig`, after which the
preexisting `ssh-store-config.*` were very confusingly named files, so I
renamed them to `common-ssh-store-config.hh` to match the type defined
therein.
2024-07-15 17:32:49 -04:00
Goldstein
1bec90e3c4
tests/functional/repl.sh: fail test on wrong stdout
Previous test implementation assumed that grep supports newlines
in patterns. It doesn't, so tests spuriously passed, even though
some tests outputs were broken.

This patches output (and expected output) before grepping,
so there're no newlines in pattern.
2024-07-15 23:11:26 +03:00
Robert Hensing
61a4d3d45c getSnippetUpTo: Return optional
This makes it possible to certain discern failures from empty
snippets, which I think is an ok review comment.

Maybe it should do so for swapped column indexes too, but I'm not
sure.

I don't think it matters in the grand scheme. We don't even have
a real use case for `nullopt` now anyway.

Since we don't have a use case, I'm not applying this logic to
higher level functions yet.
2024-07-15 20:10:45 +02:00
Robert Hensing
8a855296f5 tests/function/repl: Characterise the missing doc comment behavior 2024-07-15 19:56:40 +02:00
Robert Hensing
f9243eca75 tests/functional/repl.sh: Work around GHA failure 2024-07-15 19:56:40 +02:00
Robert Hensing
cef11b23e8 Add missing .sh in _NIX_TEST_ACCEPT=1 message 2024-07-15 19:56:40 +02:00
Robert Hensing
d4f576b0b2 nix repl: Render docs for attributes 2024-07-15 19:56:40 +02:00