Commit graph

96 commits

Author SHA1 Message Date
Eelco Dolstra 0bfba4cbf5 * Require KVM.
svn path=/nixos/trunk/; revision=23538
2010-08-29 23:24:54 +00:00
Rob Vermaas 310fffa974 nixos/lib/testing.nix: propogate exit code in runInVM function
svn path=/nixos/trunk/; revision=23102
2010-08-11 07:40:16 +00:00
Sander van der Burg 21eb6ed412 Renamed lib.zip into lib.zipTwoLists, since it refers to the wrong function
svn path=/nixos/trunk/; revision=22888
2010-08-02 16:51:33 +00:00
Sander van der Burg 58204f0a8a Changed zip into lib.zip. Sorry :$
svn path=/nixos/trunk/; revision=22884
2010-08-02 16:24:24 +00:00
Sander van der Burg 388c8e0c60 Removed the zip function, since it is in pkgs.lib now
svn path=/nixos/trunk/; revision=22883
2010-08-02 16:11:44 +00:00
Rob Vermaas 5dab679f9f lib/testing.nix: remove workaround
svn path=/nixos/trunk/; revision=22719
2010-07-23 13:59:50 +00:00
Eelco Dolstra 6c6710b85a svn path=/nixos/branches/boot-order/; revision=22367 2010-06-21 22:00:48 +00:00
Eelco Dolstra 20a88efffa * Fix networking in the installer test.
* If connecting to the host fails in the guest, then shutdown
  immediately.

svn path=/nixos/branches/boot-order/; revision=22341
2010-06-20 15:33:44 +00:00
Eelco Dolstra 411139148d * Put a timeout on the call to readline.
svn path=/nixos/branches/boot-order/; revision=22338
2010-06-19 21:57:20 +00:00
Eelco Dolstra 363806e89b * To establish the connection to the root shell in the guest, let the
guest connect to a Unix domain socket on the host rather than the
  other way around.  The former is a QEMU feature (guestfwd to a
  socket) while the latter requires a patch (which we can now get rid
  of).

svn path=/nixos/branches/boot-order/; revision=22331
2010-06-18 19:31:02 +00:00
Eelco Dolstra cf7e902283 * Intercept SIGCHLD to prevent accept() from waiting forever if QEMU
dies before connecting to the monitor.

svn path=/nixos/branches/boot-order/; revision=22328
2010-06-18 15:30:36 +00:00
Eelco Dolstra eab5aff8d0 * Drop the -no-kvm-irqchip flag here as well.
svn path=/nixos/branches/boot-order/; revision=22281
2010-06-15 18:00:56 +00:00
Eelco Dolstra 46ac1375a7 * Don't use -smb and -no-kvm-irqchip. Maybe this makes VM builds more
reliable.

svn path=/nixos/branches/boot-order/; revision=22280
2010-06-15 16:15:17 +00:00
Eelco Dolstra 483c322a62 * mustFail -> fail.
* Added a function to crash a VM.

svn path=/nixos/branches/boot-order/; revision=22200
2010-06-09 13:46:52 +00:00
Rob Vermaas de8d0c3e14 added some debugging
svn path=/nixos/trunk/; revision=22142
2010-06-04 13:18:19 +00:00
Eelco Dolstra eb4c33eeca * Added an option to enable support for 32-bit binaries (such as Wine
or Google Earth) on 64-bit NixOS on NVIDIA hardware.  The 32-bit
  OpenGL library is symlinked from /var/run/opengl-driver-32, which is
  added to the LD_LIBRARY_PATH so that 32-bit binaries can find it.

svn path=/nixos/trunk/; revision=22062
2010-05-30 22:00:52 +00:00
Eelco Dolstra f70798352d * Don't include an empty `nix-path-registration' on the CD.
svn path=/nixos/trunk/; revision=22030
2010-05-28 06:27:31 +00:00
Eelco Dolstra 62675aa0cf * Doh, forgot to commit.
svn path=/nixos/trunk/; revision=22005
2010-05-27 13:43:16 +00:00
Eelco Dolstra 77a4004df1 * The installer test lost the QEMU flags to set up the NIC to talk to
the web server somewhere, so put them back in
  (http://hydra.nixos.org/build/424923).

svn path=/nixos/trunk/; revision=22003
2010-05-27 12:20:37 +00:00
Eelco Dolstra fa89713c78 * Rename apply' and call'.
svn path=/nixos/trunk/; revision=21944
2010-05-23 12:02:54 +00:00
Eelco Dolstra 07df264e0c * mustSucceed -> succeed.
svn path=/nixos/trunk/; revision=21943
2010-05-22 21:27:38 +00:00
Eelco Dolstra dd81311714 * Optionally pass the computed `nodes' to the test script as a
function argument, so that the test script can refer to computed
  values such as the assigned IP addresses of the virtual machines.

svn path=/nixos/trunk/; revision=21939
2010-05-21 14:31:05 +00:00
Eelco Dolstra 4dac9e5814 * Allow more complex network topologies in distributed tests. Each
machine can now declare an option `virtualisation.vlans' that causes
  it to have network interfaces connected to each listed virtual
  network.  For instance,

    virtualisation.vlans = [ 1 2 ];

  causes the machine to have two interfaces (in addition to eth0, used
  by the test driver to control the machine): eth1 connected to
  network 1 with IP address 192.168.1.<i>, and eth2 connected to
  network 2 with address 192.168.2.<i> (where <i> is the index of the
  machine in the `nodes' attribute set).  On the other hand,
  
    virtualisation.vlans = [ 2 ];

  causes the machine to only have an eth1 connected to network 2 with
  address 192.168.2.<i>.  So each virtual network <n> is assigned the
  IP range 192.168.<n>.0/24.

  Each virtual network is implemented using a separate multicast
  address on the host, so guests really cannot talk to networks to
  which they are not connected.

* Added a simple NAT test to demonstrate this.

* Added an option `virtualisation.qemu.options' to specify QEMU
  command-line options.  Used to factor out some commonality between
  the test driver script and the interactive test script.

svn path=/nixos/trunk/; revision=21928
2010-05-20 21:07:32 +00:00
Nicolas Pierron 06bfb319fe Add extra module argument to provide a nesting.clone option. This option
does the same as nesting.children except that each configuration inherits
from the top-level configuration.

svn path=/nixos/trunk/; revision=21663
2010-05-08 17:18:26 +00:00
Rob Vermaas a4516ec98a workaround for some fs problems experienced by some tests of webdsl/crawljax. also added require argument to runinmachinewithx function
svn path=/nixos/trunk/; revision=21423
2010-04-29 12:45:22 +00:00
Marc Weber d1e87dfc86 adding two new options:
- system.copySystemConfiguration (requested by Ludovic Courtès)
- system.extraSystemBuilderCmds

svn path=/nixos/trunk/; revision=21406
2010-04-28 14:55:26 +00:00
Rob Vermaas e18b352ce0 remove obsolete option from machine spec
svn path=/nixos/trunk/; revision=21151
2010-04-19 07:42:27 +00:00
Rob Vermaas b75d15a9a8 virtualisation: add option to switch off readonly host fs in vm
svn path=/nixos/trunk/; revision=21126
2010-04-16 15:09:47 +00:00
Rob Vermaas 131b1e57fe nixos: add runinmachinewithx variant
svn path=/nixos/trunk/; revision=20561
2010-03-11 15:09:10 +00:00
Rob Vermaas 95f2e60c5d remove debugging
svn path=/nixos/trunk/; revision=20557
2010-03-11 13:12:17 +00:00
Rob Vermaas 3fae175c10 * nixos/lib/testing.nix: added runinmachine function to build derivation in machine given a nixos configuration
svn path=/nixos/trunk/; revision=20556
2010-03-11 13:11:06 +00:00
Eelco Dolstra c4ae499f3d svn path=/nixos/trunk/; revision=20545 2010-03-10 22:51:53 +00:00
Eelco Dolstra 358f3cd79c * In tests/default.nix, only import lib/testing.nix.
svn path=/nixos/trunk/; revision=20483
2010-03-09 10:14:45 +00:00
Lluís Batlle i Rossell 9002335101 Making nixos handle the nixpkgs 'platform' parameter.
svn path=/nixos/trunk/; revision=20274
2010-02-27 18:37:12 +00:00
Rob Vermaas d79d934d85 move functions to lib/testing to allow easier use outside of nixos
svn path=/nixos/trunk/; revision=20072
2010-02-17 09:37:22 +00:00
Lluís Batlle i Rossell 1dd3162d7c First attempt at trying to get a tarball of a bootable nixos system.
What I want with this derivation is to allow the sheevaplug nixos to
build a tarball with all the needed files to boot. Then, this can be
unpacked into an SD card, or into a NFS/TFTP server, and then the
user can boot the system with help of the uboot console.
By now, I have only tried to build the tarball in a PC, in order
to develop the nix expressions quicker.

There is nothing written specialy for the Sheevaplug in all this,
by now.


svn path=/nixos/trunk/; revision=20035
2010-02-15 23:27:51 +00:00
Eelco Dolstra 55c349fe20 * Added a test that checks whether users can log in on a virtual
console.  This uses the `sendkey' command in the QEMU monitor.
* For the block/unblock primitives, use the `set_link' command in the
  QEMU monitor.

svn path=/nixos/trunk/; revision=19854
2010-02-06 13:08:15 +00:00
Eelco Dolstra fc805fe541 * In the test driver, connect to the QEMU monitor so that we can send
it special commands such as "screendump", "sendkey" and so on.
* Take screenshots using the "screendump" command.  This has the
  advantage over "scrot" that it also supports taking a picture of the
  console, and is not affected by weird X visuals.

svn path=/nixos/trunk/; revision=19837
2010-02-05 16:51:37 +00:00
Eelco Dolstra 5b60c280d7 * Make the Quake 3 test less timing-sensitive.
svn path=/nixos/trunk/; revision=19816
2010-02-04 13:59:31 +00:00
Eelco Dolstra 160b28baa0 * Increase the timeout.
svn path=/nixos/trunk/; revision=19708
2010-01-27 12:46:53 +00:00
Eelco Dolstra fc583b7054 * When QEMU encounters a "disk full" condition on the host filesystem,
its default behaviour is to stop the emulator (i.e. suspend the VM).
  For automated tests, this is bad, because is makes the VM appear to
  hang without any error message.  The "werror=report" flag causes
  QEMU to report the problem to the VM.  As a side effect QEMU exits
  very elegantly:

    [    2.308668] end_request: I/O error, dev vda, sector 534400
    [    2.309611] Buffer I/O error on device vda, logical block 66800
    ...
    *** glibc detected *** /nix/store/yhngqrww53j0aw7z7v4bv948x5g5fc3d-qemu-kvm-0.12.1.2/bin/qemu-system-x86_64: double free or corruption (!prev): 0x08e3e040 ***
    Aborted

  So I guess we now depend on a bug in QEMU :-)

svn path=/nixos/trunk/; revision=19703
2010-01-27 10:36:43 +00:00
Eelco Dolstra 4c2fe97acc * Always create hydra-build-products, otherwise the build is made
available as a one-click install which is not useful.

svn path=/nixos/trunk/; revision=19296
2010-01-07 16:50:26 +00:00
Eelco Dolstra ec3398e4b2 * Move the serial console kernel parameters to test-instrumentation.nix.
svn path=/nixos/trunk/; revision=19275
2010-01-06 21:16:57 +00:00
Eelco Dolstra bffb5450e5 * Perform a full installation and boot from the installed system.
svn path=/nixos/trunk/; revision=19274
2010-01-06 20:52:05 +00:00
Eelco Dolstra cbca2f72df * Put a timeout on all wait* actions.
svn path=/nixos/trunk/; revision=19264
2010-01-06 15:14:26 +00:00
Eelco Dolstra 1b21115f61 * Support creating a virtual disk in the test driver.
svn path=/nixos/trunk/; revision=19263
2010-01-06 14:37:23 +00:00
Eelco Dolstra 816f12da88 * 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
2010-01-06 13:36:21 +00:00
Eelco Dolstra bc68c2985c * Added a function waitForX, which returns when the X server accepts
connections.
* In the root shell, source /etc/bashrc and set $HOME and $DISPLAY.  

svn path=/nixos/trunk/; revision=19247
2010-01-05 23:59:29 +00:00
Eelco Dolstra 5cc99487cb * A function to wait until a window exists.
svn path=/nixos/trunk/; revision=19246
2010-01-05 23:38:13 +00:00
Eelco Dolstra bc238be01a * Factor out the X11 configuration.
svn path=/nixos/trunk/; revision=19241
2010-01-05 17:08:57 +00:00