1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

[WIP} fix aarch64 release test

for some reasons in nixpkgs-unstable the string gets truncated
differently than x86 also the terminal wide is the same.
This commit is contained in:
Jörg Thalheim 2024-09-12 11:08:04 +02:00
parent 48477d4a3e
commit 1884672ef7

View file

@ -106,9 +106,17 @@ cat >flake.nix<<EOF
}; };
} }
EOF EOF
nix flake show > ./show-output.txt # close stderr, to force consistent tty size across different environments
nix flake show > ./show-output.txt 2>/dev/null
cat show-output.txt >&2
test "$(awk -F '[:] ' '/aNoDescription/{print $NF}' ./show-output.txt)" = "package 'simple'" test "$(awk -F '[:] ' '/aNoDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"
test "$(awk -F '[:] ' '/bOneLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'one line'" test "$(awk -F '[:] ' '/bOneLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'one line'"
test "$(awk -F '[:] ' '/cMultiLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'line one'" test "$(awk -F '[:] ' '/cMultiLineDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - 'line one'"
test "$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt)" = "package 'simple' - '012345678901234567890123456..." dLongDescription=$(awk -F '[:] ' '/dLongDescription/{print $NF}' ./show-output.txt)
test "$(awk -F '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'" if [[ $dLongDescription == "package 'simple' - '0123456789"* ]]; then
:
else
echo "description not as expected: $dLongDescription"
false
fi
test "$(awk -F '[:] ' '/eEmptyDescription/{print $NF}' ./show-output.txt)" = "package 'simple'"