tests-stdenv-gcc-stageCompare: delay asserts
The removed assert is covered by `meta.platforms = linux`, which will throw an "unsupported system" error on darwin. Since the platforms are restricted to linux anyway, it doesn't make sense to have this set to `all` in `release-small.nix` - `linux` should suffice. Right? The other assert is delayed until after the evaluation of `meta`. This allows the "unsupported system" error on darwin to be thrown at all, without triggering the assert before. This helps CI, which can't catch asserts properly, but can do so with `meta.platforms` based errors.
This commit is contained in:
parent
5ecd39518b
commit
3ea96163cc
@ -14,8 +14,6 @@
|
||||
lib,
|
||||
}:
|
||||
|
||||
assert stdenv.cc.isGNU;
|
||||
|
||||
with pkgs;
|
||||
# rebuild gcc using the "final" stdenv
|
||||
let
|
||||
@ -31,11 +29,23 @@ let
|
||||
NIX_OUTPATH_USED_AS_RANDOM_SEED = stdenv.cc.cc.out;
|
||||
});
|
||||
in
|
||||
assert lib.assertMsg (gcc-stageCompare ? checksum)
|
||||
|
||||
(runCommand "gcc-stageCompare"
|
||||
{
|
||||
checksumCompare =
|
||||
assert lib.assertMsg (gcc-stageCompare ? checksum)
|
||||
"tests-stdenv-gcc-stageCompare: No `checksum` output in `gcc-stageCompare` see conditional in `gcc/common/checksum.nix`";
|
||||
(runCommand "gcc-stageCompare" { } ''
|
||||
diff -sr ${pkgs.gcc-unwrapped.checksum}/checksums ${gcc-stageCompare.checksum}/checksums && touch $out
|
||||
'').overrideAttrs
|
||||
gcc-stageCompare.checksum;
|
||||
|
||||
checksumUnwrapped =
|
||||
assert lib.assertMsg (pkgs.gcc-unwrapped ? checksum)
|
||||
"tests-stdenv-gcc-stageCompare: No `checksum` output in `gcc-stageCompare` see conditional in `gcc/common/checksum.nix`";
|
||||
pkgs.gcc-unwrapped.checksum;
|
||||
}
|
||||
''
|
||||
diff -sr "$checksumUnwrapped"/checksums "$checksumCompare"/checksums && touch $out
|
||||
''
|
||||
).overrideAttrs
|
||||
(a: {
|
||||
meta = (a.meta or { }) // {
|
||||
platforms = lib.platforms.linux;
|
||||
|
||||
@ -176,5 +176,5 @@ in
|
||||
xfsprogs = linux;
|
||||
xkeyboard_config = linux;
|
||||
zip = all;
|
||||
tests-stdenv-gcc-stageCompare = all;
|
||||
tests-stdenv-gcc-stageCompare = linux;
|
||||
}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user