From 9ad89c5b56687316b4b0ef54b58a14b1ebaf3957 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Mar 2009 13:24:46 +0000 Subject: [PATCH] * Boost the priority of some jobs (like stdenv). svn path=/nixpkgs/trunk/; revision=14780 --- pkgs/top-level/release.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index cd4c60770581..73ecb5660a7f 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -4,6 +4,16 @@ let pkgs = allPackages {}; + /* Set the Hydra scheduling priority for a job. The default + priority (100) should be used for most jobs. A different + priority should only be used for a few particularly interesting + jobs (in terms of giving feedback to developers), such as stdenv. + */ + prio = level: job: toJob job // { schedulingPriority = level; }; + + toJob = x: if builtins.isAttrs x then x else + { type = "job"; systems = x; schedulingPriority = 100; }; + /* Perform a job on the given set of platforms. The function `f' is called by Hydra for each platform, and should return some job to build on that platform. `f' is passed the Nixpkgs collection @@ -13,8 +23,15 @@ let /* Map an attribute of the form `foo = [platforms...]' to `testOn [platforms...] (pkgs: pkgs.foo)'. */ - mapTestOn = pkgs.lib.mapAttrsRecursive - (path: value: testOn value (pkgs: pkgs.lib.getAttrFromPath path pkgs)); + mapTestOn = pkgs.lib.mapAttrsRecursiveCond + (as: !(as ? type && as.type == "job")) + (path: value: + let + job = toJob value; + getPkg = pkgs: + pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; } + (pkgs.lib.getAttrFromPath path pkgs); + in testOn job.systems getPkg); /* Common platform groups on which to test packages. */ linux = ["i686-linux" "x86_64-linux"]; @@ -93,7 +110,7 @@ in { file = all; findutils = all; firefox2 = linux; - firefox3 = linux; + firefox3 = prio 150 linux; flex = all; flex2535 = all; gawk = all; @@ -228,6 +245,7 @@ in { splashutils_15 = linux; sqlite = allBut "i686-cygwin"; ssmtp = linux; + stdenv = prio 175 all; strace = linux; su = linux; subversion = all;