nixosTests.kernel-rust.linux_testing: init for aarch64

Older kernels do not support Rust on aarch64, so we have to move the
platform check from all-tests.nix into the test itself.
This commit is contained in:
Alyssa Ross 2024-03-27 16:15:37 +01:00
parent 5c96956e4b
commit e7de14ea98
2 changed files with 5 additions and 3 deletions

View file

@ -457,7 +457,7 @@ in {
kerberos = handleTest ./kerberos/default.nix {};
kernel-generic = handleTest ./kernel-generic.nix {};
kernel-latest-ath-user-regd = handleTest ./kernel-latest-ath-user-regd.nix {};
kernel-rust = handleTestOn ["x86_64-linux"] ./kernel-rust.nix {};
kernel-rust = handleTest ./kernel-rust.nix {};
keter = handleTest ./keter.nix {};
kexec = handleTest ./kexec.nix {};
keycloak = discoverTests (import ./keycloak.nix);

View file

@ -4,7 +4,7 @@
}:
let
inherit (pkgs.lib) const filterAttrs mapAttrs;
inherit (pkgs.lib) const filterAttrs mapAttrs meta;
kernelRustTest = kernelPackages: import ./make-test-python.nix ({ lib, ... }: {
name = "kernel-rust";
@ -38,6 +38,8 @@ let
inherit (builtins.tryEval (
x.rust-out-of-tree-module or null != null
)) success value;
in success && value))
available =
meta.availableOn pkgs.stdenv.hostPlatform x.rust-out-of-tree-module;
in success && value && available))
pkgs.linuxKernel.vanillaPackages;
in mapAttrs (const kernelRustTest) kernels