mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
test: Move unusual-logging to run only in logging test case
This commit is contained in:
parent
03d4bfd852
commit
1421420e86
3 changed files with 19 additions and 15 deletions
|
@ -33,20 +33,6 @@ let
|
||||||
outputHash = "1dq9p0hnm1y75q2x40fws5887bq1r840hzdxak0a9djbwvx0b16d";
|
outputHash = "1dq9p0hnm1y75q2x40fws5887bq1r840hzdxak0a9djbwvx0b16d";
|
||||||
};
|
};
|
||||||
|
|
||||||
unusual-logging = mkDerivation {
|
|
||||||
name = "unusual-logging";
|
|
||||||
buildCommand = ''
|
|
||||||
{
|
|
||||||
echo "@nix 1"
|
|
||||||
echo "@nix {}"
|
|
||||||
echo '@nix {"action": null}'
|
|
||||||
echo '@nix {"action": 123}'
|
|
||||||
echo '@nix ]['
|
|
||||||
} >&$NIX_LOG_FD
|
|
||||||
touch $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
in
|
||||||
mkDerivation {
|
mkDerivation {
|
||||||
name = "dependencies-top";
|
name = "dependencies-top";
|
||||||
|
@ -56,7 +42,6 @@ mkDerivation {
|
||||||
input1_drv = input1;
|
input1_drv = input1;
|
||||||
input2_drv = input2;
|
input2_drv = input2;
|
||||||
input0_drv = input0;
|
input0_drv = input0;
|
||||||
unusual_logging_drv = unusual-logging;
|
|
||||||
fod_input_drv = fod_input;
|
fod_input_drv = fod_input;
|
||||||
meta.description = "Random test package";
|
meta.description = "Random test package";
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,3 +28,6 @@ outp="$(nix-build -E \
|
||||||
test -d "$outp"
|
test -d "$outp"
|
||||||
|
|
||||||
nix log "$outp"
|
nix log "$outp"
|
||||||
|
|
||||||
|
# Build works despite ill-formed structured build log entries.
|
||||||
|
expectStderr 0 nix build -f ./logging/unusual-logging.nix --no-link | grepQuiet 'warning: Unable to handle a JSON message from the derivation builder:'
|
||||||
|
|
16
tests/functional/logging/unusual-logging.nix
Normal file
16
tests/functional/logging/unusual-logging.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
let
|
||||||
|
inherit (import ../config.nix) mkDerivation;
|
||||||
|
in
|
||||||
|
mkDerivation {
|
||||||
|
name = "unusual-logging";
|
||||||
|
buildCommand = ''
|
||||||
|
{
|
||||||
|
echo "@nix 1"
|
||||||
|
echo "@nix {}"
|
||||||
|
echo '@nix {"action": null}'
|
||||||
|
echo '@nix {"action": 123}'
|
||||||
|
echo '@nix ]['
|
||||||
|
} >&$NIX_LOG_FD
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue