From bc32ab809c27f95b05b240c94e1eb303d2325df8 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Sat, 7 Jun 2025 21:53:15 +0800 Subject: [PATCH] nixosTests.fsck{,-systemd-stage-1}: handleTest -> runTest --- nixos/tests/all-tests.nix | 10 ++++++++-- nixos/tests/fsck.nix | 31 ++++++++++++------------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d2940b2c437f..df73a3b2a930 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -557,8 +557,14 @@ in froide-govplan = runTest ./web-apps/froide-govplan.nix; frp = runTest ./frp.nix; frr = runTest ./frr.nix; - fsck = handleTest ./fsck.nix { }; - fsck-systemd-stage-1 = handleTest ./fsck.nix { systemdStage1 = true; }; + fsck = runTest { + imports = [ ./fsck.nix ]; + _module.args.systemdStage1 = false; + }; + fsck-systemd-stage-1 = runTest { + imports = [ ./fsck.nix ]; + _module.args.systemdStage1 = true; + }; ft2-clone = runTest ./ft2-clone.nix; legit = runTest ./legit.nix; mimir = runTest ./mimir.nix; diff --git a/nixos/tests/fsck.nix b/nixos/tests/fsck.nix index a5c4ba581305..c5fcf80699e3 100644 --- a/nixos/tests/fsck.nix +++ b/nixos/tests/fsck.nix @@ -1,29 +1,22 @@ -{ - system ? builtins.currentSystem, - config ? { }, - pkgs ? import ../.. { inherit system config; }, - systemdStage1 ? false, -}: +{ systemdStage1, ... }: -import ./make-test-python.nix { +{ name = "fsck"; - nodes.machine = - { lib, ... }: - { - virtualisation.emptyDiskImages = [ 1 ]; + nodes.machine = { + virtualisation.emptyDiskImages = [ 1 ]; - virtualisation.fileSystems = { - "/mnt" = { - device = "/dev/vdb"; - fsType = "ext4"; - autoFormat = true; - }; + virtualisation.fileSystems = { + "/mnt" = { + device = "/dev/vdb"; + fsType = "ext4"; + autoFormat = true; }; - - boot.initrd.systemd.enable = systemdStage1; }; + boot.initrd.systemd.enable = systemdStage1; + }; + testScript = { nodes, ... }: let