From e7de14ea98fe984aa73a5a6b2f540ca817471106 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 27 Mar 2024 16:15:37 +0100 Subject: [PATCH] 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. --- nixos/tests/all-tests.nix | 2 +- nixos/tests/kernel-rust.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c804ce9418cd..204775c5d444 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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); diff --git a/nixos/tests/kernel-rust.nix b/nixos/tests/kernel-rust.nix index 1f269173ec2e..f32d43326061 100644 --- a/nixos/tests/kernel-rust.nix +++ b/nixos/tests/kernel-rust.nix @@ -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