diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-09-02 08:36:30 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-09-02 08:36:30 +0000 |
commit | 137c5c65bd3f10f7ccb41e2b0cda52f467944780 (patch) | |
tree | f5dcc87bc4e29b7885fbf67b77c95a63a97bbb87 | |
parent | b1aa227cbdca8c7c17e622c8cdf89949e06e66f4 (diff) | |
download | nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar.gz nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar.bz2 nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar.lz nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar.xz nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.tar.zst nixlib-137c5c65bd3f10f7ccb41e2b0cda52f467944780.zip |
* Added a timeout for starting the VM. TODO: handle SIGCHLD from
qemu. * Do the subversion test on i686-linux. svn path=/nixos/trunk/; revision=16923
-rw-r--r-- | lib/build-vms.nix | 3 | ||||
-rw-r--r-- | lib/test-driver/Machine.pm | 2 | ||||
-rw-r--r-- | release.nix | 1 | ||||
-rw-r--r-- | tests/subversion.nix | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/lib/build-vms.nix b/lib/build-vms.nix index 939c1ecc51c2..39ae9b77cf37 100644 --- a/lib/build-vms.nix +++ b/lib/build-vms.nix @@ -1,6 +1,7 @@ { nixos ? ./.. , nixpkgs ? /etc/nixos/nixpkgs , services ? /etc/nixos/services +, system ? builtins.currentSystem }: let pkgs = import nixpkgs { config = {}; }; in @@ -55,7 +56,7 @@ rec { nodes: configuration: import "${nixos}/lib/eval-config.nix" { - inherit nixpkgs services; + inherit nixpkgs services system; modules = [ configuration ]; extraArgs = { inherit nodes; }; /* !!! bug in the module/option handling: this ignores the diff --git a/lib/test-driver/Machine.pm b/lib/test-driver/Machine.pm index 0573293c2afb..7b97ff1a65db 100644 --- a/lib/test-driver/Machine.pm +++ b/lib/test-driver/Machine.pm @@ -90,9 +90,11 @@ sub connect { $self->start; + my $try = 0; while (1) { last if -e ($self->{stateDir} . "/running"); sleep 1; + die ("VM " . $self->{name} . " timed out") if $try++ > 180; } while (1) { diff --git a/release.nix b/release.nix index f2dd8e8bcbec..4dbf798ec0c9 100644 --- a/release.nix +++ b/release.nix @@ -103,6 +103,7 @@ let (import ./tests/subversion.nix { inherit nixpkgs services; + system = "i686-linux"; }).report; diff --git a/tests/subversion.nix b/tests/subversion.nix index e6f438b01f46..c9556137305f 100644 --- a/tests/subversion.nix +++ b/tests/subversion.nix @@ -1,6 +1,7 @@ { nixos ? ./.. , nixpkgs ? /etc/nixos/nixpkgs , services ? /etc/nixos/services +, system ? builtins.currentSystem }: with import ../lib/build-vms.nix { inherit nixos nixpkgs services; }; |