Commit graph

30 commits

Author SHA1 Message Date
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 260d9faee7 * Urgh.
svn path=/nixos/trunk/; revision=25471
2011-01-09 18:31:03 +00:00
Eelco Dolstra a3aa97009c * Doh.
svn path=/nixos/trunk/; revision=25469
2011-01-09 18:16:59 +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 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
Rob Vermaas c8afc67f6a lib/testing.nix: vm state of nixos machines in network changed location
svn path=/nixos/trunk/; revision=25222
2010-12-21 10:57:19 +00:00
Eelco Dolstra e90a1cfc59 * A quick hack to enable debugging of VM test scripts: the test script
is now made available in the interactive test driver.  For instance,
  you can do

  $ nix-build tests/ -A quake3.driver
  $ ./result/bin/nixos-test-driver
  > eval $ENV{'testScript'};
  ... see VMs + X11 + Quake get started, bots running around ...
  >

  So after this you can run commands interactively on the VMs in the
  state they were in after the conclusion of the test script.

svn path=/nixos/trunk/; revision=25158
2010-12-16 19:35:43 +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 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
Rob Vermaas 5dab679f9f lib/testing.nix: remove workaround
svn path=/nixos/trunk/; revision=22719
2010-07-23 13:59:50 +00:00
Rob Vermaas de8d0c3e14 added some debugging
svn path=/nixos/trunk/; revision=22142
2010-06-04 13:18:19 +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 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
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
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
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
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 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 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 5af12b6afe * Provide a function for taking a screenshot.
svn path=/nixos/trunk/; revision=19225
2010-01-05 11:35:59 +00:00
Eelco Dolstra 51097933ab * Moved test-related stuff from lib/build-vms.nix to lib/testing.nix.
* Factored out some commonality between tests to make them a bit
  simpler to write.  A test is a function { pkgs, ... }: -> { nodes,
  testScript } or { machine, testScript }.  So it's no longer
  necessary to have a "vms" attribute in every test.

svn path=/nixos/trunk/; revision=19220
2010-01-05 11:18:43 +00:00