git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/release: Use callSubTests for subtests

Should clean up a lot of these redundant lines for various sub-tests. Note that the tests.boot* are now called tests.boot.boot*, but otherwise all the test attribute names should stay the same. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @edolstra Cc: @wkennington Cc: @bobvanderlinden

commit7eea91fbc0efc19f416121369f566c6f5363fbc0 authoraszlig <aszlig@redmoonstudios.org> dateMon 29 Feb 2016, 20:11 (11 years ago) parent2f2536b
2 files changed+6−41
nixos/release-combined.nix+1−1 nixos/release.nix+5−40
nixos/release-combined.nix+1−1
@@ -63,7 +63,7 @@ in rec {
6363 (all nixos.tests.installer.btrfsSimple)
6464 (all nixos.tests.installer.btrfsSubvols)
6565 (all nixos.tests.installer.btrfsSubvolDefault)
66− (all nixos.tests.bootBiosCdrom)
66+ (all nixos.tests.boot.bootBiosCdrom)
6767 (all nixos.tests.ipv6)
6868 (all nixos.tests.kde4)
6969 #(all nixos.tests.lightdm)
nixos/release.nix+5−40
@@ -233,6 +233,7 @@ in rec {
233233 tests.avahi = callTest tests/avahi.nix {};
234234 tests.bittorrent = callTest tests/bittorrent.nix {};
235235 tests.blivet = callTest tests/blivet.nix {};
236+ tests.boot = callSubTests tests/boot.nix {};
236237 tests.cadvisor = hydraJob (import tests/cadvisor.nix { system = "x86_64-linux"; });
237238 tests.chromium = callTest tests/chromium.nix {};
238239 tests.cjdns = callTest tests/cjdns.nix {};
@@ -250,18 +251,7 @@ in rec {
250251 tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
251252 tests.grsecurity = callTest tests/grsecurity.nix {};
252253 tests.i3wm = callTest tests/i3wm.nix {};
253− tests.installer.grub1 = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).grub1.test);
254− tests.installer.lvm = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).lvm.test);
255− tests.installer.luksroot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).luksroot.test);
256− tests.installer.separateBoot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBoot.test);
257− tests.installer.separateBootFat = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBootFat.test);
258− tests.installer.simple = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simple.test);
259− tests.installer.simpleLabels = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleLabels.test);
260− tests.installer.simpleProvided = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleProvided.test);
261− tests.installer.swraid = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).swraid.test);
262− tests.installer.btrfsSimple = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSimple.test);
263− tests.installer.btrfsSubvols = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSubvols.test);
264− tests.installer.btrfsSubvolDefault = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).btrfsSubvolDefault.test);
254+ tests.installer = callSubTests tests/installer.nix {};
265255 tests.influxdb = callTest tests/influxdb.nix {};
266256 tests.ipv6 = callTest tests/ipv6.nix {};
267257 tests.jenkins = callTest tests/jenkins.nix {};
@@ -280,24 +270,8 @@ in rec {
280270 tests.mysqlReplication = callTest tests/mysql-replication.nix {};
281271 tests.nat.firewall = callTest tests/nat.nix { withFirewall = true; };
282272 tests.nat.standalone = callTest tests/nat.nix { withFirewall = false; };
283− tests.networking.networkd.loopback = callTest tests/networking.nix { networkd = true; test = "loopback"; };
284− tests.networking.networkd.static = callTest tests/networking.nix { networkd = true; test = "static"; };
285− tests.networking.networkd.dhcpSimple = callTest tests/networking.nix { networkd = true; test = "dhcpSimple"; };
286− tests.networking.networkd.dhcpOneIf = callTest tests/networking.nix { networkd = true; test = "dhcpOneIf"; };
287− tests.networking.networkd.bond = callTest tests/networking.nix { networkd = true; test = "bond"; };
288− tests.networking.networkd.bridge = callTest tests/networking.nix { networkd = true; test = "bridge"; };
289− tests.networking.networkd.macvlan = callTest tests/networking.nix { networkd = true; test = "macvlan"; };
290− tests.networking.networkd.sit = callTest tests/networking.nix { networkd = true; test = "sit"; };
291− tests.networking.networkd.vlan = callTest tests/networking.nix { networkd = true; test = "vlan"; };
292− tests.networking.scripted.loopback = callTest tests/networking.nix { networkd = false; test = "loopback"; };
293− tests.networking.scripted.static = callTest tests/networking.nix { networkd = false; test = "static"; };
294− tests.networking.scripted.dhcpSimple = callTest tests/networking.nix { networkd = false; test = "dhcpSimple"; };
295− tests.networking.scripted.dhcpOneIf = callTest tests/networking.nix { networkd = false; test = "dhcpOneIf"; };
296− tests.networking.scripted.bond = callTest tests/networking.nix { networkd = false; test = "bond"; };
297− tests.networking.scripted.bridge = callTest tests/networking.nix { networkd = false; test = "bridge"; };
298− tests.networking.scripted.macvlan = callTest tests/networking.nix { networkd = false; test = "macvlan"; };
299− tests.networking.scripted.sit = callTest tests/networking.nix { networkd = false; test = "sit"; };
300− tests.networking.scripted.vlan = callTest tests/networking.nix { networkd = false; test = "vlan"; };
273+ tests.networking.networkd = callSubTests tests/networking.nix { networkd = true; };
274+ tests.networking.scripted = callSubTests tests/networking.nix { networkd = false; };
301275 # TODO: put in networking.nix after the test becomes more complete
302276 tests.networkingProxy = callTest tests/networking-proxy.nix {};
303277 tests.nfs3 = callTest tests/nfs.nix { version = 3; };
@@ -317,17 +291,8 @@ in rec {
317291 tests.simple = callTest tests/simple.nix {};
318292 tests.tomcat = callTest tests/tomcat.nix {};
319293 tests.udisks2 = callTest tests/udisks2.nix {};
320− tests.virtualbox = let
321− testsOnly = filterAttrs (const (t: t ? test));
322− vboxTests = testsOnly (import tests/virtualbox.nix {
323− system = "x86_64-linux";
324− });
325− in mapAttrs (const (t: hydraJob t.test)) vboxTests;
294+ tests.virtualbox = callSubTests tests/virtualbox.nix { system = "x86_64-linux"; };
326295 tests.xfce = callTest tests/xfce.nix {};
327− tests.bootBiosCdrom = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootBiosCdrom);
328− tests.bootBiosUsb = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootBiosUsb);
329− tests.bootUefiCdrom = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootUefiCdrom);
330− tests.bootUefiUsb = forAllSystems (system: hydraJob (import tests/boot.nix { inherit system; }).bootUefiUsb);
331296
332297
333298 /* Build a bunch of typical closures so that Hydra can keep track of