diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-06 13:36:21 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-06 13:36:21 +0000 |
commit | 816f12da885b1ac8c961ac628c932297a9f5cd2f (patch) | |
tree | 39ce2cd99e83509559ebc0b6051f4067a331081c /tests/installer.nix | |
parent | 1da72333d9aa9cf1a1d1143d0540cdd73e9a2059 (diff) | |
download | nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar.gz nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar.bz2 nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar.lz nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar.xz nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.tar.zst nixpkgs-816f12da885b1ac8c961ac628c932297a9f5cd2f.zip |
* Test driver: added support for running from an ISO image. The goal
is to merge test-nixos-install-from-cd so that we have a single testing framework. svn path=/nixos/trunk/; revision=19259
Diffstat (limited to 'tests/installer.nix')
-rw-r--r-- | tests/installer.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/installer.nix b/tests/installer.nix new file mode 100644 index 00000000000..f57f8e90a3e --- /dev/null +++ b/tests/installer.nix @@ -0,0 +1,28 @@ +{ pkgs, nixpkgs, system, ... }: + +rec { + + # Build the ISO. This is the regular installation CD but with test + # instrumentation. + iso = + (import ../lib/eval-config.nix { + inherit nixpkgs system; + modules = + [ ../modules/installer/cd-dvd/installation-cd-minimal.nix + ../modules/testing/test-instrumentation.nix + { key = "serial"; + boot.kernelParams = [ "console=tty1" "console=ttyS0" ]; + } + ]; + }).config.system.build.isoImage; + + testScript = + '' + #createDisk("harddisk", 2 * 1024); + + my $machine = Machine->new({ hda => "harddisk", cdrom => glob("${iso}/iso/*.iso") }); + $machine->start; + + $machine->mustSucceed("echo hello"); + ''; +} |