diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-05-03 23:12:48 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-05-03 23:12:48 +0300 |
commit | aadaa913792b0fdeb68b02425e4f03d2f8286a1f (patch) | |
tree | ea582b078a00e6ba27e2c887a9df5a792c37fb0e /nixos/tests/boot.nix | |
parent | 2362891dc815160e343e52458f25db22508ac487 (diff) | |
parent | e7d3166656af0d98da9f59c78e2213cec842d743 (diff) | |
download | nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar.gz nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar.bz2 nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar.lz nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar.xz nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.tar.zst nixlib-aadaa913792b0fdeb68b02425e4f03d2f8286a1f.zip |
Merge remote-tracking branch 'upstream/master' into staging
Conflicts: pkgs/applications/networking/browsers/vivaldi/default.nix pkgs/misc/emulators/wine/base.nix
Diffstat (limited to 'nixos/tests/boot.nix')
-rw-r--r-- | nixos/tests/boot.nix | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/nixos/tests/boot.nix b/nixos/tests/boot.nix index 905d16458825..af7db5aa8164 100644 --- a/nixos/tests/boot.nix +++ b/nixos/tests/boot.nix @@ -44,5 +44,44 @@ in { usb => glob("${iso}/iso/*.iso"), bios => '${pkgs.OVMF}/FV/OVMF.fd' ''; - } - + netboot = let + config = (import ../lib/eval-config.nix { + inherit system; + modules = + [ ../modules/installer/netboot/netboot.nix + ../modules/testing/test-instrumentation.nix + { key = "serial"; } + ]; + }).config; + ipxeScriptDir = pkgs.writeTextFile { + name = "ipxeScriptDir"; + text = '' + #!ipxe + dhcp + kernel bzImage init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} console=ttyS0 + initrd initrd + boot + ''; + destination = "/boot.ipxe"; + }; + ipxeBootDir = pkgs.symlinkJoin { + name = "ipxeBootDir"; + paths = [ + config.system.build.netbootRamdisk + config.system.build.kernel + ipxeScriptDir + ]; + }; + in + makeTest { + name = "boot-netboot"; + nodes = { }; + testScript = + '' + my $machine = createMachine({ qemuFlags => '-boot order=n -net nic,model=e1000 -net user,tftp=${ipxeBootDir}/,bootfile=boot.ipxe -m 2000M' }); + $machine->start; + $machine->waitForUnit("multi-user.target"); + $machine->shutdown; + ''; + }; +} |