tests: adopt bootspec v1 format
This commit is contained in:
parent
48ff4cb7c4
commit
9fe979d2d6
|
@ -54,7 +54,7 @@ let
|
||||||
return f'/boot/EFI/nixos/{store_dir}-{filename}.efi'
|
return f'/boot/EFI/nixos/{store_dir}-{filename}.efi'
|
||||||
|
|
||||||
machine.start()
|
machine.start()
|
||||||
bootspec = json.loads(machine.succeed("cat /run/current-system/boot.json")).get('v1')
|
bootspec = json.loads(machine.succeed("cat /run/current-system/boot.json")).get('org.nixos.bootspec.v1')
|
||||||
assert bootspec is not None, "Unsupported bootspec version!"
|
assert bootspec is not None, "Unsupported bootspec version!"
|
||||||
src_path = ${path.src}
|
src_path = ${path.src}
|
||||||
dst_path = ${path.dst}
|
dst_path = ${path.dst}
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub fn setup_generation_link_from_toplevel(
|
||||||
version: u64,
|
version: u64,
|
||||||
) -> Result<PathBuf> {
|
) -> Result<PathBuf> {
|
||||||
let bootspec = json!({
|
let bootspec = json!({
|
||||||
"v1": {
|
"org.nixos.bootspec.v1": {
|
||||||
"init": format!("init-v{}", version),
|
"init": format!("init-v{}", version),
|
||||||
"initrd": toplevel.join("initrd"),
|
"initrd": toplevel.join("initrd"),
|
||||||
"kernel": toplevel.join("kernel"),
|
"kernel": toplevel.join("kernel"),
|
||||||
|
@ -56,11 +56,8 @@ pub fn setup_generation_link_from_toplevel(
|
||||||
"label": "LanzaOS",
|
"label": "LanzaOS",
|
||||||
"toplevel": toplevel,
|
"toplevel": toplevel,
|
||||||
"system": "x86_64-linux",
|
"system": "x86_64-linux",
|
||||||
"specialisation": {},
|
},
|
||||||
"extensions": {
|
"org.nixos-community.lanzaboote": { "osRelease": toplevel.join("os-release") }
|
||||||
"lanzaboote": { "osRelease": toplevel.join("os-release") }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let generation_link_path = profiles_directory.join(format!("system-{}-link", version));
|
let generation_link_path = profiles_directory.join(format!("system-{}-link", version));
|
||||||
|
|
Loading…
Reference in New Issue