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;
|
||||
incron = runTest ./incron.nix;
|
||||
incus = import ./incus {
|
||||
inherit runTest;
|
||||
inherit runTestOn;
|
||||
package = pkgs.incus;
|
||||
};
|
||||
incus-lts = import ./incus {
|
||||
inherit runTest;
|
||||
inherit runTestOn;
|
||||
package = pkgs.incus-lts;
|
||||
};
|
||||
influxdb = runTest ./influxdb.nix;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
package,
|
||||
runTest,
|
||||
runTestOn,
|
||||
}:
|
||||
let
|
||||
incusRunTest =
|
||||
config:
|
||||
runTest {
|
||||
runTestOn [ "x86_64-linux" "aarch64-linux" ] {
|
||||
imports = [
|
||||
./incus-tests-module.nix
|
||||
./incus-tests.nix
|
||||
@@ -18,6 +18,8 @@ let
|
||||
};
|
||||
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 {
|
||||
name = "all";
|
||||
appArmor = true;
|
||||
@@ -43,6 +45,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# used in lxc tests to verify container functionality
|
||||
container = incusRunTest {
|
||||
name = "container";
|
||||
|
||||
@@ -63,7 +66,7 @@ in
|
||||
network.ovs = true;
|
||||
};
|
||||
|
||||
ui = runTest {
|
||||
ui = runTestOn [ "x86_64-linux" "aarch64-linux" ] {
|
||||
imports = [ ./ui.nix ];
|
||||
|
||||
_module.args = { inherit package; };
|
||||
|
||||
@@ -5,14 +5,29 @@
|
||||
...
|
||||
}:
|
||||
|
||||
# TODO aarch64 vm filter
|
||||
let
|
||||
cfg = config.tests.incus;
|
||||
|
||||
instanceScript = lib.foldlAttrs (
|
||||
acc: name: instance:
|
||||
acc + instance.testScript
|
||||
) "" cfg.instances;
|
||||
# limit building of VMs to these systems as nested virtualization is
|
||||
# required to test VMs, but support for this is poor outside x86
|
||||
# will print warnings on those systems rather than failing outright
|
||||
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
|
||||
{
|
||||
name = "${cfg.package.name}-${cfg.name}";
|
||||
@@ -21,9 +36,6 @@ in
|
||||
maintainers = lib.teams.lxc.members;
|
||||
};
|
||||
|
||||
# sshBackdoor.enable = true;
|
||||
# enableDebugHook = true;
|
||||
|
||||
nodes.server = {
|
||||
virtualisation = {
|
||||
cores = 2;
|
||||
|
||||
Reference in New Issue
Block a user