Now automated test runs - installs and boots NixOS - on my computer. Some minor issue with socat transferring report from virtual machine to host, though.

svn path=/nixos/trunk/; revision=12830
This commit is contained in:
Michael Raskin 2008-09-08 22:36:11 +00:00
parent 88be528d9d
commit f03fed54e0
4 changed files with 26 additions and 11 deletions

View file

@ -66,4 +66,8 @@ in
'';
}
];
nix = pkgs: pkgs.nixCustomFun (pkgs.nixUnstable.src)
""
["nix-reduce-build" "nix-http-export.cgi"]
["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
}).rescueCD

View file

@ -14,7 +14,7 @@ mkdir -p /mnt/etc/nixos
cat > /mnt/etc/nixos/configuration.nix <<EOF
{
pkgs: full_configuration: {
boot = {
grubDevice = "/dev/sda";
copyKernels = true;
@ -67,9 +67,13 @@ cat > /mnt/etc/nixos/configuration.nix <<EOF
};
environment = {
extraPackages = pkgs: [
pkgs.socat
extraPackages = [
pkgs.socat (pkgs.lowPrio pkgs.nixUnstable)
];
nix = pkgs.nixCustomFun (pkgs.nixUnstable.src)
""
["nix-reduce-build" "nix-http-export.cgi"]
["--with-docbook-xsl=\\\${pkgs.docbook5_xsl}/xml/xsl/docbook/"];
};
}

View file

@ -24,7 +24,7 @@ echo "reboot" | ./socat/bin/socat tcp-listen:4424 stdio >> report &
if ( ! [ -d dvd/iso ] ) || ( [ -z "$USE_LEFTOVER_DVD" ] ); then
rm dvd
# unset NIXPKGS_CONFIG to reduce host -> image configuration leak
NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/configuration/closed-install.nix ||
NIXPKGS_CONFIG= nix-build -o dvd /etc/nixos/nixos/installer/cd-dvd/closed-install.nix ||
{ echo "Failed to build LiveDVD" >&2 ; exit 2; };
fi;
@ -52,7 +52,7 @@ if ( ! [ -f install-test.img ] ) || ( [ -z "$JUST_BOOT" ] ); then
) | ssh -l root -i /var/certs/ssh/id_livedvd -o StrictHostKeyChecking=no 127.0.0.1 -p 4425
fi;
./qemu/bin/qemu --kernel-kqemu -m 512 install-test.img -no-reboot
./qemu/bin/qemu --kernel-kqemu -m 128 install-test.img -no-reboot
echo "Report contains: "
cat report

View file

@ -40,14 +40,16 @@
*/
,additionalFiles ? []
,compressImage ? false
,nixpkgsPath ? ../../nixpkgs
,nixpkgsPath ? ../../../nixpkgs
,additionalJobs ? []
,intel3945FWEnable ? false
,intel3945FWEnable ? true
,intel4965FWEnable ? true
,cdLabel ? "NIXOS_INSTALLATION_CD"
,relName ?
if builtins.pathExists ../../relname
then builtins.readFile ../../relname
else "nixos-${builtins.readFile ../../VERSION}"
,nix ? pkgs: pkgs.nix
}:
let
realLib = if lib != null then lib else (import (nixpkgsPath+"/pkgs/lib"));
@ -151,6 +153,7 @@ rec {
kernelModules = bootKernelModules;
extraModulePackages = ((extraModulePackages pkgs)
++(if aufs then [(kernelPackages pkgs).aufs] else [])
++(pkgs.lib.optional intel3945FWEnable (kernelPackages pkgs).iwlwifi)
);
};
@ -159,6 +162,13 @@ rec {
sshd = { enable = sshdEnabled; };
xserver = { enable = false; };
udev = {
addFirmware = []
++ (pkgs.lib.optional intel3945FWEnable pkgs.iwlwifi3945ucode)
++ (pkgs.lib.optional intel4965FWEnable pkgs.iwlwifi4965ucode)
;
};
extraJobs = [
# Unpack the NixOS/Nixpkgs sources to /etc/nixos.
@ -314,6 +324,7 @@ rec {
] ++ (packages pkgs);
checkConfigurationOptions = true;
cleanStart = cleanStart;
nix = nix pkgs;
};
users = {
@ -326,10 +337,6 @@ rec {
}
];
networking = {
enableIntel3945ABGFirmware = intel3945FWEnable;
};
}; in preConfiguration // (arbitraryOverrides preConfiguration);
configurations = [{