Commit graph

18 commits

Author SHA1 Message Date
Artturin 3f3ca2d90d tests.testers.testBuildFailure.helloDoesNotFail: fix confusing output
the output made me think that the test failed but did not fail

testBuildFailure-helloDoesNotFail> Checking /nix/store/x6403x1llpk00i59cmr96iy92mx1f7hb-hello-2.12.1/testBuildFailure.log
testBuildFailure-helloDoesNotFail> testBuildFailure: The builder did not fail, but a failure was expected!
2023-01-17 20:49:24 +02:00
Artturin 40197595ce test.testers: fix getAllOutputNames not found 2023-01-17 20:34:36 +02:00
Artturin 238a6053c4 stdenv: support opt-in __structuredAttrs
Co-authored-by: Robin Gloster <mail@glob.in>

stdenv: print message if structuredAttrs is enabled

stdenv: add _append

reduces the chance of a user doing it wrong

fix nix develop issue

output hooks don't work yet in nix develop though

making $outputs be the same on non-structuredAttrs and structuredAttrs
is too much trouble.

lets instead make a function that gets the output names

reading environment file '/nix/store/2x7m69a2sm2kh0r6v0q5s9z1dh41m4xf-xz-5.2.5-env-bin'
nix: src/nix/develop.cc:299: std::string Common::makeRcScript(nix::ref<nix::Store>, const BuildEnvironment&, const Path&): Assertion `outputs != buildEnvironment.vars.end()' failed.

use a function to get all output names instead of using $outputs

copy env functionality from https://github.com/NixOS/nixpkgs/pull/76732/commits
2022-12-08 06:13:19 +02:00
Robert Hensing dbdd8fad26 testers.testBuildFailure: Read last log line without final newline 2022-12-02 16:12:50 +00:00
Robert Hensing 3cf3fef372 testers: Add missing doc link comments 2022-10-27 14:06:39 +02:00
Robert Hensing e20a362908 testers.testEqualContents: init 2022-10-27 14:06:38 +02:00
Robert Hensing 44d0f37833 testers.testBuildFailure: init 2022-10-27 14:06:38 +02:00
Robert Hensing aed1deab05 nixos/testing: Fix release.nix tests evaluation
Fixes the problem introduced by 12b3066aae
which caused nixos/release.nix to return the wrong attributes, while
intending to only affect nixos/lib's runTest.
This also removes callTest from the test options, because callTest is
only ever invoked by all-tests.nix.
2022-09-29 10:49:09 +02:00
Artturin a23fbeb6e8 testers.testVersion: if grep failed then print the output of the command 2022-05-16 16:16:35 +03:00
Robert Hensing c3bbe1d9c7 testers.nixosTest: Remove redundant system.stateVersion = lib.trivial.release;
Already present in nixos/modules/testing/test-instrumentation.nix,
which is imported by the test framework.
2022-05-09 14:33:49 +02:00
Robert Hensing ebf0465d09 Merge remote-tracking branch 'upstream/master' into testers 2022-05-09 14:27:13 +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
Robert Hensing 7edb414660 testers.nixosTest: Move from top-level and improve docs 2022-05-05 12:48:47 +02:00
Robert Hensing c071530ca5 testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
Artturin 41808d42d2 doc: move testers to their own chapter 2022-04-22 16:24:29 +03:00
Artturin 3cc2e86bab testers: convert to a format that is kind of compatible with nixdoc
Examples: support has to be added to https://github.com/nix-community/nixdoc

'nixdoc --category testers --description "nixpkgs testers" --file ./pkgs/build-support/testers/default.nix'
2022-04-22 16:24:29 +03:00
Artturin 250ef1ff39 testers.testVersion: move from trivial-builders.nix
we will have more testers in the future so they should have their own
location

putting 'testers' in args will also make it simpler to use multiple testers
2022-04-22 16:22:40 +03:00
Artturin 52a744b7f8 testers.testEqualDerivation: move from build-support/test-equal-derivation.nix 2022-04-20 15:44:40 +03:00