Commit graph

80 commits

Author SHA1 Message Date
aszlig b32ef4dbef
test-driver/Machine: Add new allowReboot flag.
This is to actually allow for the target machine to reboot, which could
come in handy for some VM tests in NixOps. Well, actually to be more
specific: We need it for the Hetzner NixOps backend test. :-)

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2013-07-31 23:25:09 +02:00
Eelco Dolstra 57c35c94ca Use the qemu-kvm wrapper 2013-07-31 14:53:27 +02:00
Eelco Dolstra 6620a0f679 Fix the installer tests
E.g. http://hydra.nixos.org/build/5561399
2013-07-17 13:01:12 +02:00
Eelco Dolstra 80c5b807d2 Fix tree toggles in VM tests 2013-06-14 13:50:00 +02:00
Rob Vermaas 960bb2bcd3 Fix nixos test driver startJob function. It was stopping the job before. 2013-03-20 20:45:43 +01:00
Eelco Dolstra e5d4524dda Test driver: Don't wait for a reply after issuing "poweroff" 2012-10-30 17:01:21 +01:00
Eelco Dolstra 3d6824feaa Machine.pm: Don't add .service implicitly
Systemd will add .service anyway if no unit type is given.
2012-10-19 10:32:09 -04:00
Eelco Dolstra 13a5ebad32 Update some tests for systemd 2012-10-04 12:34:44 -04:00
Eelco Dolstra 08f14b33c1 Merge branch 'master' of github.com:NixOS/nixos into systemd 2012-08-20 11:27:38 -04:00
Eelco Dolstra a025e7e7e2 Provide a common share between VMs to allow easy communication
Every VM now mounts a common SMB share on /tmp/shared.
2012-08-16 10:47:33 -04:00
Eelco Dolstra d4fec178fd Merge remote-tracking branch 'origin/master' into systemd 2012-08-02 13:44:16 -04:00
Eelco Dolstra 87ae768665 Fix the LVM installer test
GRUB 2 doesn't want to boot off a LVM disk:

machine# installing the GRUB 2 boot loader on /dev/vda...
machine# Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
machine# /nix/store/7yc535h1lim1a5gkhjb3fr6c8193dv8w-install-grub.pl: installation of GRUB on /dev/vda failed

In theory GRUB 2 supports booting from LVM, but we probably need to
generate the right grub.conf (see
https://wiki.archlinux.org/index.php/GRUB2#LVM).

http://hydra.nixos.org/build/2904680
2012-07-26 16:02:33 -04:00
Eelco Dolstra 1a2b3cc5e4 Fix the tests.installer.grub1 test
GRUB 1 doesn't understand /dev/vda, so use a SCSI rather than virtio disk.
2012-07-26 16:02:33 -04:00
Marc Weber 47e67f5e9c renaming all occurrences of /var/run/{booted,current}-system
in particular those found in docs
still keeping old path in modules/config/shells.nix for unkown reason (?)
2012-07-23 14:01:35 -04:00
Eelco Dolstra 1cde1bdbe6 nixos-run-vms: If there is only one VM, attach stdio to its serial console
This is useful for interactive testing (quicker than logging in via
SSH and more convenient than logging in via a virtual console).
2012-07-20 12:03:15 -04:00
Eelco Dolstra 82019c01bb Test driver: exit when all VMs have exited rather than sleeping forever 2012-06-22 14:31:07 -04:00
Eelco Dolstra fa50d105d7 * Pass -cpu kvm64 in NixOS VMs (and add a simple regression test for
GMP).

svn path=/nixos/trunk/; revision=33849
2012-04-19 18:56:35 +00:00
Eelco Dolstra 1d0c23bffb * Use a raw disk for the installer test. This speeds it up by almost
two minutes on my laptop.  Note that due to sparse allocation, raw
  disks don't actually take up more space than qcow2 disks (and
  they're temporary anyway).

svn path=/nixos/trunk/; revision=33746
2012-04-11 10:05:29 +00:00
Eelco Dolstra a395e46192 * Fix the NFS Upstart dependencies. Mountd is now started before
nfsd, as suggested by the nfs-utils README.

  Also, rather than relying on Upstart events (which have all sorts of
  problems, especially if you have jobs that have multiple
  dependencies), we know just let jobs start their on prerequisites.
  That is, nfsd starts mountd in its preStart script; mountd starts
  statd; statd starts portmap.  Likewise, mountall starts statd to
  ensure that it can mount NFS filesystems.  This means that doing
  something like "start nfsd" from the command line will Do The Right
  Thing and start the dependencies of nfsd.

svn path=/nixos/trunk/; revision=33172
2012-03-16 20:10:14 +00:00
Eelco Dolstra d75efe4aa1 * For security, don't mount the entire host filesystem.
svn path=/nixos/trunk/; revision=28429
2011-08-09 14:07:44 +00:00
Eelco Dolstra 2dc81fc9dd * Shut up warnings about QEMU_OPTS being undefined.
svn path=/nixos/trunk/; revision=27982
2011-07-28 09:41:07 +00:00
Eelco Dolstra 0f544f1ea8 * Add a command `forwardPort' to forward a TCP port on the host to a
TCP port on the guest.  Useful during testing (e.g. to access a web
  server in the guest through a web browser on the host).

svn path=/nixos/trunk/; revision=26987
2011-04-27 09:54:17 +00:00
Eelco Dolstra c430bf5cc3 * Add virtio_console to the CD because the backdoor requires it.
* The booted CD no longer requires "-net user".

svn path=/nixos/trunk/; revision=26427
2011-03-19 08:58:56 +00:00
Eelco Dolstra be0fca5781 * Use QEMU/KVM's paravirtualised console device for the backdoor.
This has the advantage that it doesn't depend on networking being
  up.
* Move common QEMU/KVM guest configuration to profiles/qemu-guest.nix.

svn path=/nixos/trunk/; revision=26421
2011-03-18 12:38:22 +00:00
Eelco Dolstra 158a60465f * The vde_switch startup code was reading from the wrong filehandle,
so the startup synchronisation didn't work, causing spurious QEMU
  failures ("Device 'vde' could not be initialized").

svn path=/nixos/trunk/; revision=26055
2011-02-22 10:41:11 +00:00
Eelco Dolstra 32aa967ee1 * Only add a VDE NIC if there is a webserver.
svn path=/nixos/trunk/; revision=25986
2011-02-16 10:07:28 +00:00
Eelco Dolstra 88a4fda7d8 * Don't daemonise vde_switch so that it's cleaned up automatically.
This is useful for interactive use.

svn path=/nixos/trunk/; revision=25570
2011-01-14 16:01:47 +00:00
Eelco Dolstra b3dbcbe249 * Use vde_switch instead of QEMU's multicast feature to tie QEMU VMs
together into virtual networks.  This has several advantages:

  - It's more secure because the QEMU instances use Unix domain
    sockets to talk to the switch.

  - It doesn't depend on the host's network interfaces.  (Local
    multicast fails if there is no default gateway, so for instance it
    fails if a laptop is not connected to any network.)

  - VDE devices can be connected together to form arbitrary network
    topologies.

  - VDE has a "wirefilter" tool to emulate delays and packet loss,
    which are useful for network testing.

svn path=/nixos/trunk/; revision=25526
2011-01-12 18:47:23 +00:00
Eelco Dolstra 5560e422ad * Prerender the tree toggle.
svn path=/nixos/trunk/; revision=25494
2011-01-10 15:29:22 +00:00
Eelco Dolstra 0b33ba7e53 * Clean up the presentation of the log file a bit.
svn path=/nixos/trunk/; revision=25493
2011-01-10 15:17:38 +00:00
Eelco Dolstra 60b6eb7579 * Add a method Machine::sleep to sleep N seconds in virtual (guest)
time rather than host real time.

svn path=/nixos/trunk/; revision=25491
2011-01-10 14:41:16 +00:00
Eelco Dolstra 8f831338df * Log top-level errors.
svn path=/nixos/trunk/; revision=25482
2011-01-09 22:52:27 +00:00
Eelco Dolstra b5b7375eea * If a subtest fails, mark the build as failed.
svn path=/nixos/trunk/; revision=25474
2011-01-09 18:56:11 +00:00
Eelco Dolstra 7fd8ce0d95 * If a subtest fails, continue to the next subtest.
svn path=/nixos/trunk/; revision=25472
2011-01-09 18:46:02 +00:00
Eelco Dolstra e4c1fb3ea7 * Pretty-print the VM build log and publish it as a build product.
svn path=/nixos/trunk/; revision=25468
2011-01-09 17:58:52 +00:00
Eelco Dolstra 405e4dd42e * Somewhere "set_link" stopped accepting "down" and "up" as valid
parameters.

svn path=/nixos/trunk/; revision=25466
2011-01-09 15:44:48 +00:00
Eelco Dolstra e343a16a36 * Improved logging in the test driver.
* Support subtests.

svn path=/nixos/trunk/; revision=25451
2011-01-06 17:28:35 +00:00
Eelco Dolstra 7378e17f74 * Test driver: write structured log info to $out/log.xml (not finished
yet).
* Machine->new -> createMachine (because VMs must be tracked in the
  %vms hash).

svn path=/nixos/trunk/; revision=25427
2011-01-05 15:27:21 +00:00
Eelco Dolstra 0966854590 * Use makeWrapper in building the test driver.
* In the interactive test driver, provide a function "testScript" to
  run the non-interactive test script.

svn path=/nixos/trunk/; revision=25426
2011-01-05 14:04:38 +00:00
Eelco Dolstra dac1936869 * If $DISPLAY is set (i.e. in interactive mode), show QEMU's graphical
output.

svn path=/nixos/trunk/; revision=25157
2010-12-16 16:58:06 +00:00
Eelco Dolstra 445827ad45 * Added a convenience derivation for running the test driver
interactively on a network specification.  For instance:

  $ nix-build tests/ -A quake3.driver
  $ ./result/bin/nixos-test-driver
  > startAll;
  client1: starting vm
  client1: QEMU running (pid 14971)
  server: starting vm
  server: QEMU running (pid 14982)
  ...
  > $client1->execute("quake3 ...");

* Use the GNU readline library in interactive mode.

svn path=/nixos/trunk/; revision=25156
2010-12-16 15:54:15 +00:00
Eelco Dolstra 8496dbf350 * Absolutize the path to the VM start script.
svn path=/nixos/trunk/; revision=25154
2010-12-16 13:53:17 +00:00
Ludovic Courtès 4695f790cf test-driver: Add `startJob' method.
svn path=/nixos/trunk/; revision=24210
2010-10-10 22:37:45 +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