diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-01-11 18:16:17 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-01-19 10:35:49 +0200 |
commit | 4fd0a3a43d6a4be050e786706e258707049d76d9 (patch) | |
tree | 6ecefb3b3d053a68eb35eec543375869a566aab4 | |
parent | eb57d6d08997a41b59fe97b5815baf60d92e063a (diff) |
nixos/release.nix: More refactoring for multi-arch
Currently, even if you pass supportedSystems = [ "aarch64-linux" ] you end up with e.g. `nixos.tests.docker` which actually silently runs on x86_64-linux. Using the new callTestOnTheseSystems fixes that. As a side-effect, this also causes a rename of `nixos.tests.docker` -> `nixos.tests.docker.x86_64-linux`, which is IMHO a good thing since it's makes them consistent with the rest of the tests.
-rw-r--r-- | nixos/release-combined.nix | 2 | ||||
-rw-r--r-- | nixos/release.nix | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix index 34a413f1ac3e6..6583b13b844e7 100644 --- a/nixos/release-combined.nix +++ b/nixos/release-combined.nix @@ -80,7 +80,7 @@ in rec { (all nixos.tests.boot.uefiUsb) (all nixos.tests.boot-stage1) (all nixos.tests.hibernate) - nixos.tests.docker + nixos.tests.docker.x86_64-linux (all nixos.tests.ecryptfs) (all nixos.tests.env) (all nixos.tests.ipv6) diff --git a/nixos/release.nix b/nixos/release.nix index 521bf8f5943c2..ad33378003841 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -16,7 +16,8 @@ let inherit system; } // args); - callTest = fn: args: forAllSystems (system: hydraJob (importTest fn args system)); + callTestOnTheseSystems = systems: fn: args: forTheseSystems systems (system: hydraJob (importTest fn args system)); + callTest = callTestOnTheseSystems supportedSystems; callSubTests = fn: args: let discover = attrs: let @@ -228,7 +229,7 @@ in rec { tests.blivet = callTest tests/blivet.nix {}; tests.boot = callSubTests tests/boot.nix {}; tests.boot-stage1 = callTest tests/boot-stage1.nix {}; - tests.cadvisor = hydraJob (import tests/cadvisor.nix { system = "x86_64-linux"; }); + tests.cadvisor = callTestOnTheseSystems ["x86_64-linux"] tests/cadvisor.nix {}; tests.chromium = (callSubTests tests/chromium.nix { system = "x86_64-linux"; }).stable; tests.cjdns = callTest tests/cjdns.nix {}; tests.cloud-init = callTest tests/cloud-init.nix {}; @@ -243,12 +244,12 @@ in rec { tests.containers-hosts = callTest tests/containers-hosts.nix {}; tests.containers-macvlans = callTest tests/containers-macvlans.nix {}; tests.couchdb = callTest tests/couchdb.nix {}; - tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; }); - tests.docker-edge = hydraJob (import tests/docker-edge.nix { system = "x86_64-linux"; }); + tests.docker = callTestOnTheseSystems ["x86_64-linux"] tests/docker.nix {}; + tests.docker-edge = callTestOnTheseSystems ["x86_64-linux"] tests/docker-edge.nix {}; tests.dovecot = callTest tests/dovecot.nix {}; - tests.dnscrypt-proxy = callTest tests/dnscrypt-proxy.nix { system = "x86_64-linux"; }; + tests.dnscrypt-proxy = callTestOnTheseSystems ["x86_64-linux"] tests/dnscrypt-proxy.nix {}; tests.ecryptfs = callTest tests/ecryptfs.nix {}; - tests.etcd = hydraJob (import tests/etcd.nix { system = "x86_64-linux"; }); + tests.etcd = callTestOnTheseSystems ["x86_64-linux"] tests/etcd.nix {}; tests.ec2-nixops = hydraJob (import tests/ec2.nix { system = "x86_64-linux"; }).boot-ec2-nixops; tests.ec2-config = hydraJob (import tests/ec2.nix { system = "x86_64-linux"; }).boot-ec2-config; tests.elk = callSubTests tests/elk.nix { system = "x86_64-linux"; }; @@ -256,7 +257,7 @@ in rec { tests.ferm = callTest tests/ferm.nix {}; tests.firefox = callTest tests/firefox.nix {}; tests.firewall = callTest tests/firewall.nix {}; - tests.fleet = hydraJob (import tests/fleet.nix { system = "x86_64-linux"; }); + tests.fleet = callTestOnTheseSystems ["x86_64-linux"] tests/fleet.nix {}; #tests.gitlab = callTest tests/gitlab.nix {}; tests.gitolite = callTest tests/gitolite.nix {}; tests.gocd-agent = callTest tests/gocd-agent.nix {}; @@ -316,7 +317,7 @@ in rec { tests.openssh = callTest tests/openssh.nix {}; tests.owncloud = callTest tests/owncloud.nix {}; tests.pam-oath-login = callTest tests/pam-oath-login.nix {}; - #tests.panamax = hydraJob (import tests/panamax.nix { system = "x86_64-linux"; }); + #tests.panamax = callTestOnTheseSystems ["x86_64-linux"] tests/panamax.nix {}; tests.peerflix = callTest tests/peerflix.nix {}; tests.php-pcre = callTest tests/php-pcre.nix {}; tests.postgresql = callSubTests tests/postgresql.nix {}; |