Commit graph

169 commits

Author SHA1 Message Date
Eelco Dolstra
97f087cd44 Turn networking.interfaces into an attribute set
Thus

  networking.interfaces = [ { name = "eth0"; ipAddress = "192.168.15.1"; } ];

can now be written as

  networking.interfaces.eth0.ipAddress = "192.168.15.1";

The old notation still works though.
2012-11-02 17:08:11 +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
3f6d53cc97 Move escapeSystemdPath to lib/utils.nix
The new file ‘utils.nix’ is intended for NixOS-specific library
functions (i.e. stuff that shouldn't go into Nixpkgs' lib/).
2012-10-12 17:01:49 -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
Shea Levy
1b615f460b Allow overriding all NixOS tests to run with the minimal kernel possible for that test's config(s) (based on requiredKernelConfig) 2012-08-04 09:45:26 -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
387f1d6032 * Forgot to commit.
svn path=/nixos/trunk/; revision=33938
2012-04-27 08:47:51 +00:00
Eelco Dolstra
6c1bb54483 * In the installation CD, make the NixOS/Nixpkgs available as if they
were obtained from the NixOS channel.  "nixos-install" copies this
  to the installed system as well.
* In the installation CD, set GC_INITIAL_HEAP_SIZE to a low value for
  the benefit of memory-constrained environments.

svn path=/nixos/trunk/; revision=33887
2012-04-23 00:41:37 +00: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
Shea Levy
8efda48496 Enable building an efi-bootable ISO
svn path=/nixos/trunk/; revision=33140
2012-03-16 05:37:24 +00:00
Eelco Dolstra
29d84af677 * Remove the use of the NIXPKGS and NIXOS environment variables.
Instead use $NIX_PATH.  NIXOS_CONFIG is still supported.

svn path=/nixos/trunk/; revision=32739
2012-03-02 12:38:22 +00:00
Peter Simons
d16fdad9fd Revert "split release.nix into helpers and the jobs themselves".
Change r32480 was made due to a misunderstanding.

svn path=/nixos/trunk/; revision=32512
2012-02-23 12:00:05 +00:00
Peter Simons
bd9b32620c split release.nix into helpers and the jobs themselves
this allows for external use of the helpers, for example to build custom cds without editing release.nix

svn path=/nixos/trunk/; revision=32480
2012-02-22 20:28:57 +00:00
Peter Simons
eb6e1310b8 strip trailing whitespace; no functional change
svn path=/nixos/trunk/; revision=29285
2011-09-14 18:20:50 +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
8aad8c536f * Make virtualisation.qemu.options a list.
svn path=/nixos/trunk/; revision=28120
2011-08-02 06:52:10 +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
650d14be8d * Remove most references to the "services" tree.
svn path=/nixos/trunk/; revision=26990
2011-04-27 13:16:33 +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
Rob Vermaas
22a4047b1b NixOS/124: The system_tarball Hydra job should define a build product
svn path=/nixos/trunk/; revision=26788
2011-04-12 07:45:54 +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
8ce36ffb3a * Use "ip" instead of "ifconfig" for setting up network interfaces,
since the latter is rather deprecated and has been unmaintained
  since 2001.  Note that "ip" doesn't know about classful addressing,
  so you can no longer get away with not specifying the subnet mask
  for explicitly configured interfaces.  So if you had

    networking.interfaces =
      [ { name = "eth0"; ipAddress = "192.168.1.1"; } ];

  this should be changed to

    networking.interfaces =
      [ { name = "eth0";
          ipAddress = "192.168.1.1";
          subnetMask = "255.255.255.0";
        }
     ];

  otherwise you end up with a subnet mask of 255.255.255.255.

svn path=/nixos/trunk/; revision=26279
2011-03-11 14:50:11 +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
49213aa80a * Doh! Exceptions outside of subtests were silently ignored.
svn path=/nixos/trunk/; revision=25981
2011-02-15 15:04:17 +00:00
Sander van der Burg
96b769c979 Removed the backdoor, because it does not work anymore and it has also become obsolete (Disnix uses something else now)
svn path=/nixos/trunk/; revision=25601
2011-01-17 16:15:59 +00:00
Eelco Dolstra
066f76e65f * Remove "nix-build tests -A foo.vms; ./result/bin/run-vms" as a way
to run the VMs of a test.  Instead, you can do

    $ nix-build tests -A foo.driver
    $ ./result/bin/nixos-run-vms

  This uses the test driver infrastructure, which is necessary in
  order to set up the VDE switches.

svn path=/nixos/trunk/; revision=25586
2011-01-16 14:21:47 +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
2ac09578c0 * runInMachine: properly evaluate the machine configuration.
svn path=/nixos/trunk/; revision=25536
2011-01-13 11:39:03 +00:00
Eelco Dolstra
06a239a699 * runInMachine: use buildVM rather than buildVirtualNetwork since
there is only one machine.
* Add a simple test case for runInMachine.

svn path=/nixos/trunk/; revision=25535
2011-01-13 10:54:07 +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
ef82cd9c48 * Coverage report: propagate the build products of the VM test run.
* Run the Quake 3 with coverage instrumentation.

svn path=/nixos/trunk/; revision=25480
2011-01-09 22:21:22 +00:00
Eelco Dolstra
20b8258e68 * Handle the case where a machine produces no coverage data.
svn path=/nixos/trunk/; revision=25477
2011-01-09 21:37:01 +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