* 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
This commit is contained in:
Eelco Dolstra 2009-08-31 14:56:19 +00:00
parent a2945a2eb2
commit 9359bf11d5
10 changed files with 35 additions and 16 deletions

View File

@ -1,5 +1,6 @@
{ nixos ? /etc/nixos/nixos
{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
}:
let pkgs = import nixpkgs { config = {}; }; in
@ -54,7 +55,7 @@ rec {
nodes: configuration:
import "${nixos}/lib/eval-config.nix" {
inherit nixpkgs;
inherit nixpkgs services;
modules = [ configuration ];
extraArgs = { inherit nodes; };
/* !!! bug in the module/option handling: this ignores the
@ -175,6 +176,9 @@ rec {
echo "making report..."
ensureDir $out/coverage
${pkgs.lcov}/bin/genhtml --show-details $TMPDIR/out.info -o $out/coverage
ensureDir $out/nix-support
echo "report coverage $out/coverage" >> $out/nix-support/hydra-build-products
''; # */
}

View File

@ -4,6 +4,7 @@
{ system ? builtins.currentSystem
, nixpkgs ? import ./from-env.nix "NIXPKGS" /etc/nixos/nixpkgs
, services ? /etc/nixos/services
, pkgs ? null
, baseModules ? import ../modules/module-list.nix
, extraArgs ? {}
@ -28,6 +29,7 @@ rec {
extraArgs = extraArgs_ // {
inherit pkgs optionDeclarations;
modulesPath = ../modules;
servicesPath = services;
};
# Import Nixpkgs, allowing the NixOS option nixpkgs.config to
@ -46,7 +48,7 @@ rec {
inherit system;
config =
(import ./eval-config.nix {
inherit system nixpkgs extraArgs modules;
inherit system nixpkgs services extraArgs modules;
# For efficiency, leave out most NixOS modules; they don't
# define nixpkgs.config, so it's pointless to evaluate them.
baseModules = [ ../modules/misc/nixpkgs.nix ];

View File

@ -1,4 +1,4 @@
{pkgs, config, ...}:
{ config, pkgs, servicesPath, ... }:
with pkgs.lib;
@ -70,7 +70,7 @@ let
startupScript = "";
options = {};
};
res = defaults // svcFunction {inherit config pkgs serverInfo;};
res = defaults // svcFunction {inherit config pkgs serverInfo servicesPath;};
in res;
in map f defs;

View File

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, servicesPath, ... }:
let
@ -31,7 +31,7 @@ let
# Build the maintenance scripts and commit hooks.
scripts = substituteInAll {
name = "svn-server-scripts";
src = pkgs.lib.cleanSource ../../../../services/subversion/src/scripts;
src = pkgs.lib.cleanSource "${servicesPath}/subversion/src/scripts";
# The variables to substitute:
@ -75,7 +75,7 @@ let
# Build our custom authentication modules.
authModules = import ../../../../services/subversion/src/auth {
authModules = import "${servicesPath}/subversion/src/auth" {
inherit (pkgs) stdenv apacheHttpd;
};
@ -115,7 +115,7 @@ let
# Build ViewVC.
viewvc = import ../../../../services/subversion/src/viewvc {
viewvc = import "${servicesPath}/subversion/src/viewvc" {
inherit (pkgs) fetchurl stdenv python enscript;
inherit urlPrefix reposDir adminAddr subversion;
};
@ -149,7 +149,7 @@ let
# Build WebSVN.
websvn = import ../../../../services/subversion/src/websvn {
websvn = import "${servicesPath}/subversion/src/websvn" {
inherit (pkgs) fetchurl stdenv writeText enscript gnused diffutils;
inherit urlPrefix reposDir subversion;
cacheDir = tmpDir;
@ -232,7 +232,7 @@ let
staticFiles = substituteInSome {
name = "svn-static-files";
src = pkgs.lib.cleanSource ../../../../services/subversion/root;
src = pkgs.lib.cleanSource "${servicesPath}/subversion/root";
files = ["xsl/svnindex.xsl"];
inherit urlPrefix;
};

View File

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let
workersProperties = pkgs.writeText "workers.properties" ''

View File

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let
inherit (pkgs.lib) mkOption;

View File

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let

View File

@ -1,4 +1,4 @@
{config, pkgs, serverInfo}:
{ config, pkgs, serverInfo, ... }:
let

View File

@ -96,6 +96,14 @@ let
module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
description = "graphical";
};
tests.subversion =
{ services ? ../services }:
(import ./tests/subversion.nix {
inherit nixpkgs services;
}).report;
};

View File

@ -1,4 +1,9 @@
with import ../lib/build-vms.nix {};
{ nixos ? ./..
, nixpkgs ? /etc/nixos/nixpkgs
, services ? /etc/nixos/services
}:
with import ../lib/build-vms.nix { inherit nixos nixpkgs services; };
let