* Rename apply' and call'.

svn path=/nixos/trunk/; revision=21944
This commit is contained in:
Eelco Dolstra 2010-05-23 12:02:54 +00:00
parent 07df264e0c
commit fa89713c78
2 changed files with 18 additions and 17 deletions

View File

@ -84,10 +84,11 @@ rec {
''; # */
# !!! Rename these functions to something more sensible.
call = f: f { inherit pkgs nixpkgs system; };
makeTest = testFun: complete (call testFun);
makeTests = testsFun: lib.mapAttrs (name: complete) (call testsFun);
apply = testFun: complete (call testFun);
apply = makeTest; # compatibility
call = f: f { inherit pkgs nixpkgs system; };
complete = t: t // rec {
nodes =
@ -173,10 +174,10 @@ rec {
runInMachine ({
machine = client;
preBuild = ''
$client->waitForX ;
$client->waitForX;
'' ;
} // args );
simpleTest = as: (apply ({ ... }: as)).test;
simpleTest = as: (makeTest ({ ... }: as)).test;
}

View File

@ -6,16 +6,16 @@
with import ../lib/testing.nix { inherit nixpkgs services system; };
{
bittorrent = apply (import ./bittorrent.nix);
firefox = apply (import ./firefox.nix);
installer = pkgs.lib.mapAttrs (name: complete) (call (import ./installer.nix));
kde4 = apply (import ./kde4.nix);
login = apply (import ./login.nix);
nat = apply (import ./nat.nix);
openssh = apply (import ./openssh.nix);
portmap = apply (import ./portmap.nix);
proxy = apply (import ./proxy.nix);
quake3 = apply (import ./quake3.nix);
subversion = apply (import ./subversion.nix);
trac = apply (import ./trac.nix);
bittorrent = makeTest (import ./bittorrent.nix);
firefox = makeTest (import ./firefox.nix);
installer = makeTests (import ./installer.nix);
kde4 = makeTest (import ./kde4.nix);
login = makeTest (import ./login.nix);
nat = makeTest (import ./nat.nix);
openssh = makeTest (import ./openssh.nix);
portmap = makeTest (import ./portmap.nix);
proxy = makeTest (import ./proxy.nix);
quake3 = makeTest (import ./quake3.nix);
subversion = makeTest (import ./subversion.nix);
trac = makeTest (import ./trac.nix);
}