nixos/tests/incus: use runTestOn to limit systems, skip VMs aarch64-linux
This commit is contained in:
@@ -743,11 +743,11 @@ in
|
|||||||
immich-vectorchord-reindex = runTest ./web-apps/immich-vectorchord-reindex.nix;
|
immich-vectorchord-reindex = runTest ./web-apps/immich-vectorchord-reindex.nix;
|
||||||
incron = runTest ./incron.nix;
|
incron = runTest ./incron.nix;
|
||||||
incus = import ./incus {
|
incus = import ./incus {
|
||||||
inherit runTest;
|
inherit runTestOn;
|
||||||
package = pkgs.incus;
|
package = pkgs.incus;
|
||||||
};
|
};
|
||||||
incus-lts = import ./incus {
|
incus-lts = import ./incus {
|
||||||
inherit runTest;
|
inherit runTestOn;
|
||||||
package = pkgs.incus-lts;
|
package = pkgs.incus-lts;
|
||||||
};
|
};
|
||||||
influxdb = runTest ./influxdb.nix;
|
influxdb = runTest ./influxdb.nix;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
package,
|
package,
|
||||||
runTest,
|
runTestOn,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
incusRunTest =
|
incusRunTest =
|
||||||
config:
|
config:
|
||||||
runTest {
|
runTestOn [ "x86_64-linux" "aarch64-linux" ] {
|
||||||
imports = [
|
imports = [
|
||||||
./incus-tests-module.nix
|
./incus-tests-module.nix
|
||||||
./incus-tests.nix
|
./incus-tests.nix
|
||||||
@@ -18,6 +18,8 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# this is the main test which will test as much as possible
|
||||||
|
# run this for testing incus upgrades, also available in incus package tests
|
||||||
all = incusRunTest {
|
all = incusRunTest {
|
||||||
name = "all";
|
name = "all";
|
||||||
appArmor = true;
|
appArmor = true;
|
||||||
@@ -43,6 +45,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# used in lxc tests to verify container functionality
|
||||||
container = incusRunTest {
|
container = incusRunTest {
|
||||||
name = "container";
|
name = "container";
|
||||||
|
|
||||||
@@ -63,7 +66,7 @@ in
|
|||||||
network.ovs = true;
|
network.ovs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
ui = runTest {
|
ui = runTestOn [ "x86_64-linux" "aarch64-linux" ] {
|
||||||
imports = [ ./ui.nix ];
|
imports = [ ./ui.nix ];
|
||||||
|
|
||||||
_module.args = { inherit package; };
|
_module.args = { inherit package; };
|
||||||
|
|||||||
@@ -5,14 +5,29 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# TODO aarch64 vm filter
|
|
||||||
let
|
let
|
||||||
cfg = config.tests.incus;
|
cfg = config.tests.incus;
|
||||||
|
|
||||||
instanceScript = lib.foldlAttrs (
|
# limit building of VMs to these systems as nested virtualization is
|
||||||
acc: name: instance:
|
# required to test VMs, but support for this is poor outside x86
|
||||||
acc + instance.testScript
|
# will print warnings on those systems rather than failing outright
|
||||||
) "" cfg.instances;
|
vmsEnabled = lib.elem pkgs.stdenv.system [ "x86_64-linux" ];
|
||||||
|
|
||||||
|
instanceScript = lib.pipe cfg.instances [
|
||||||
|
(lib.filterAttrs (
|
||||||
|
name: instance:
|
||||||
|
let
|
||||||
|
keep = instance.type != "virtual-machine" || vmsEnabled;
|
||||||
|
in
|
||||||
|
lib.warnIf (!keep) ''
|
||||||
|
Skipping virtual-machine ${name} as VMs are disabled on ${pkgs.stdenv.system}
|
||||||
|
'' keep
|
||||||
|
))
|
||||||
|
(lib.foldlAttrs (
|
||||||
|
acc: name: instance:
|
||||||
|
acc + instance.testScript
|
||||||
|
) "")
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
name = "${cfg.package.name}-${cfg.name}";
|
name = "${cfg.package.name}-${cfg.name}";
|
||||||
@@ -21,9 +36,6 @@ in
|
|||||||
maintainers = lib.teams.lxc.members;
|
maintainers = lib.teams.lxc.members;
|
||||||
};
|
};
|
||||||
|
|
||||||
# sshBackdoor.enable = true;
|
|
||||||
# enableDebugHook = true;
|
|
||||||
|
|
||||||
nodes.server = {
|
nodes.server = {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
cores = 2;
|
cores = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user