diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-05 11:18:43 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2010-01-05 11:18:43 +0000 |
commit | 51097933ab1413fe6a1e853d39a273a7b9969c26 (patch) | |
tree | e6585ff22117c15c96f5f46759dafe92775a87e4 /tests/quake3.nix | |
parent | ff86799d42abf507bace415da4f8406871a763c8 (diff) | |
download | nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar.gz nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar.bz2 nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar.lz nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar.xz nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.tar.zst nixpkgs-51097933ab1413fe6a1e853d39a273a7b9969c26.zip |
* 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
Diffstat (limited to 'tests/quake3.nix')
-rw-r--r-- | tests/quake3.nix | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/quake3.nix b/tests/quake3.nix index b08e679e1e1..c3c047bdab8 100644 --- a/tests/quake3.nix +++ b/tests/quake3.nix @@ -1,10 +1,4 @@ -{ nixos ? ./.. -, nixpkgs ? /etc/nixos/nixpkgs -, services ? /etc/nixos/services -, system ? builtins.currentSystem -}: - -with import ../lib/build-vms.nix { inherit nixos nixpkgs services system; }; +{ pkgs, ... }: rec { @@ -34,9 +28,7 @@ rec { client2 = client; }; - vms = buildVirtualNetwork { inherit nodes; }; - - test = runTests vms + testScript = '' startAll; @@ -57,8 +49,8 @@ rec { $server->mustSucceed("grep -q 'Foo.*entered the game' /tmp/log"); $server->mustSucceed("grep -q 'Bar.*entered the game' /tmp/log"); - print STDERR $client1->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen1.png"); - print STDERR $client2->execute("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen2.png"); + print STDERR $client1->mustSucceed("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen1.png"); + print STDERR $client2->mustSucceed("DISPLAY=:0.0 scrot /hostfs/$ENV{out}/screen2.png"); ''; } |