1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

nixos/tests/atop: fix version regex, add timeout (#335902)

This commit is contained in:
Pol Dellaiera 2024-09-08 18:19:35 +02:00 committed by GitHub
commit eb9ae53c73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,7 +24,7 @@ let assertions = rec {
with subtest("binary should report the correct version"):
pkgver = "${pkgs.atop.version}"
ver = re.sub(r'(?s)^Version: (\d\.\d\.\d).*', r'\1', machine.succeed("atop -V"))
ver = re.sub(r'(?s)^Version: (\d+\.\d+\.\d+).*', r'\1', machine.succeed("atop -V"))
assert ver == pkgver, f"Version is `{ver}`, expected `{pkgver}`"
'';
atoprc = contents:
@ -103,6 +103,9 @@ let assertions = rec {
machine.fail("type -p atopgpud")
'';
};
meta = {
timeout = 600;
};
in
{
justThePackage = makeTest {
@ -120,6 +123,7 @@ in
(netatop false)
(atopgpu false)
];
inherit meta;
};
defaults = makeTest {
name = "atop-defaults";
@ -138,6 +142,7 @@ in
(netatop false)
(atopgpu false)
];
inherit meta;
};
minimal = makeTest {
name = "atop-minimal";
@ -159,6 +164,7 @@ in
(netatop false)
(atopgpu false)
];
inherit meta;
};
netatop = makeTest {
name = "atop-netatop";
@ -178,6 +184,7 @@ in
(netatop true)
(atopgpu false)
];
inherit meta;
};
atopgpu = makeTest {
name = "atop-atopgpu";
@ -197,6 +204,7 @@ in
(netatop false)
(atopgpu true)
];
inherit meta;
};
everything = makeTest {
name = "atop-everything";
@ -222,5 +230,6 @@ in
(netatop true)
(atopgpu true)
];
inherit meta;
};
}