Commit graph

9 commits

Author SHA1 Message Date
Eelco Dolstra c6d4282f25 svn path=/nixos/trunk/; revision=16950 2009-09-02 23:37:58 +00:00
Eelco Dolstra 497760b444 * Use scrot to make screenshots.
* Another X11 test (running Quake 3).

svn path=/nixos/trunk/; revision=16949
2009-09-02 23:16:33 +00:00
Eelco Dolstra 05cb34c6d0 svn path=/nixos/trunk/; revision=16942 2009-09-02 19:59:26 +00:00
Eelco Dolstra 486714bfcc * Make the coverage report more concise.
svn path=/nixos/trunk/; revision=16926
2009-09-02 09:38:16 +00:00
Eelco Dolstra 137c5c65bd * Added a timeout for starting the VM. TODO: handle SIGCHLD from
qemu.
* Do the subversion test on i686-linux.  

svn path=/nixos/trunk/; revision=16923
2009-09-02 08:36:30 +00:00
Eelco Dolstra b1aa227cbd * Use -no-reboot, otherwise kernel panics cause QEMU to get into an
infinite loop trying to start the machine.

svn path=/nixos/trunk/; revision=16922
2009-09-02 07:52:36 +00:00
Eelco Dolstra 4d8d704fba * Run the subversion.nix test with coverage analysis on the kernel.
svn path=/nixos/trunk/; revision=16917
2009-09-01 22:22:45 +00:00
Eelco Dolstra 9359bf11d5 * Build the Subversion test in Hydra (as a regression test for NixOS).
* Pass the location to the services tree around instead of requiring
  it to be in ../services.

svn path=/nixos/trunk/; revision=16901
2009-08-31 14:56:19 +00:00
Eelco Dolstra 27a8e656bc * Stuff for automatic and manual testing of NixOS VMs.
lib/build-vms.nix contains a function `buildVirtualNetwork' that
  takes a specification of a network of machines (as an attribute set
  of NixOS machine configurations) and builds a script that starts
  each configuration in a separate QEMU/KVM VM and connects them
  together in a virtual network.  This script can be run manually to
  test the VMs interactively.  There is also a function `runTests'
  that starts and runs the virtual network in a derivation, and
  then executes a test specification that tells the VMs to do certain
  things (i.e., letting one VM send an HTTP request to a webserver on
  another VM).  The tests are written in Perl (for now).

  tests/subversion.nix shows a simple example, namely a network of two
  machines: a webserver that runs the Subversion subservice, and a
  client.  Apache, Subversion and a few other packages are built with
  coverage analysis instrumentation.  For instance,

    $ nix-build tests/subversion.nix -A vms
    $ ./result/bin/run-vms

  starts two QEMU/KVM instances.  When they have finished booting, the
  webserver can be accessed from the host through
  http://localhost:8081/.

  It also has a small test suite:

    $ nix-build tests/subversion.nix -A report

  This runs the VMs in a derivation, runs the tests, and then produces
  a distributed code coverage analysis report (i.e. it shows the
  combined coverage on both machines).

  The Perl test driver program is in lib/test-driver.  It executes
  commands on the guest machines by connecting to a root shell running
  on port 514 (provided by modules/testing/test-instrumentation.nix).

  The VMs are connected together in a virtual network using QEMU's
  multicast feature.  This isn't very secure.  At the very least,
  other processes on the same machine can listen to or send packets on
  the virtual network.  On the plus side, we don't need to be root to
  set up a multicast virtual network, so we can do it from a
  derivation.  Maybe we can use VDE instead.

  (Moved from the vario repository.)

svn path=/nixos/trunk/; revision=16899
2009-08-31 14:25:12 +00:00