Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/gunnar

crates/gunnar-recipe/tests/shared_kernel_requires.rs

//! ★ Lane G10 (2026-10-21): **Gunnar's media ask the SHARED hot-plug and wall-clock rows.**
//!
//! PCI hot-plug (35290f29, beside the runtime probe b247bf64) and the paravirt wall clock
//! (50c3e69) were written here first. Both lists now live in edda
//! `nornir_build_thing::kernel_requires`, so holger's installer media ask the same kernel the
//! same thing (holger declared no hot-plug, and a runtime grow on such a kernel answers 511).
//! One writer: this recipe keeps no copy of its own.

use nornir_build_thing::kernel_requires::{clock_requires, hotplug_requires};
use nornir_build_thing::plugin::BuildThing;

use gunnar_recipe::GunnarBuildThing;

#[test]
fn every_installer_row_carries_the_shared_hotplug_and_clock_rows_and_the_recipe_keeps_no_copy() {
    let set = GunnarBuildThing.variants();
    assert!(!set.installers.is_empty());
    for row in &set.installers {
        for want in hotplug_requires().iter().chain(clock_requires().iter()) {
            assert!(
                row.requires.contains(want),
                "installer '{}' does not carry the shared row {want:?}",
                row.name
            );
        }
    }
    for iso in &set.isos {
        for want in &clock_requires() {
            assert!(
                iso.requires.contains(want),
                "iso '{}' does not carry the shared clock row {want:?}",
                iso.name
            );
        }
    }
    let src = include_str!("../src/recipe.rs");
    assert!(
        !src.contains("\nfn hotplug_requires(") && !src.contains("\nfn clock_requires("),
        "the recipe keeps no copy of the shared rows"
    );
}