From ce7b064a11a74ad4dfe0d827e6090525607494f6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Oct 2011 13:07:13 +0000 Subject: [PATCH] * Remove the remote building test. svn path=/nixos/trunk/; revision=29756 --- release.nix | 1 - tests/default.nix | 1 - tests/remote-builds.nix | 91 ----------------------------------------- 3 files changed, 93 deletions(-) delete mode 100644 tests/remote-builds.nix diff --git a/release.nix b/release.nix index 1ba256e5d3b8..0a414fd9ccbe 100644 --- a/release.nix +++ b/release.nix @@ -179,7 +179,6 @@ let openssh = t.openssh.test; proxy = t.proxy.test; quake3 = t.quake3.report; - remote_builds = t.remote_builds.test; #subversion = t.subversion.report; tomcat = t.tomcat.test; trac = t.trac.test; diff --git a/tests/default.nix b/tests/default.nix index e8c2e348b2ba..fc7bdb79f766 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -22,7 +22,6 @@ with import ../lib/testing.nix { inherit nixpkgs system; }; portmap = makeTest (import ./portmap.nix); proxy = makeTest (import ./proxy.nix); quake3 = makeTest (import ./quake3.nix); - remote_builds = makeTest (import ./remote-builds.nix); simple = makeTest (import ./simple.nix); #subversion = makeTest (import ./subversion.nix); tomcat = makeTest (import ./tomcat.nix); diff --git a/tests/remote-builds.nix b/tests/remote-builds.nix deleted file mode 100644 index 80ba9c71e73b..000000000000 --- a/tests/remote-builds.nix +++ /dev/null @@ -1,91 +0,0 @@ -# Test Nix's remote build feature. - -{ pkgs, ... }: - -let - - # The configuration of the build slaves. - slave = - { config, pkgs, ... }: - { services.openssh.enable = true; - virtualisation.writableStore = true; - }; - - # Trivial Nix expression to build remotely. - expr = config: nr: pkgs.writeText "expr.nix" - '' - let utils = builtins.storePath ${config.system.build.extraUtils}; in - derivation { - name = "hello-${toString nr}"; - system = "i686-linux"; - PATH = "''${utils}/bin"; - builder = "''${utils}/bin/sh"; - args = [ "-c" "echo Hello; mkdir $out; cat /proc/sys/kernel/hostname > $out/host; sleep 3" ]; - } - ''; - -in - -{ - - nodes = - { slave1 = slave; - slave2 = slave; - - client = - { config, pkgs, ... }: - { nix.maxJobs = 0; # force remote building - nix.distributedBuilds = true; - nix.buildMachines = - [ { hostName = "slave1"; - sshUser = "root"; - sshKey = "/root/.ssh/id_dsa"; - system = "i686-linux"; - maxJobs = 1; - } - { hostName = "slave2"; - sshUser = "root"; - sshKey = "/root/.ssh/id_dsa"; - system = "i686-linux"; - maxJobs = 1; - } - ]; - virtualisation.writableStore = true; - virtualisation.pathsInNixDB = [ config.system.build.extraUtils ]; - }; - }; - - testScript = { nodes }: - '' - startAll; - - # Create an SSH key on the client. - my $key = `${pkgs.openssh}/bin/ssh-keygen -t dsa -f key -N ""`; - $client->succeed("mkdir -m 700 /root/.ssh"); - $client->copyFileFromHost("key", "/root/.ssh/id_dsa"); - $client->succeed("chmod 600 /root/.ssh/id_dsa"); - - # Install the SSH key on the slaves. - foreach my $slave ($slave1, $slave2) { - $slave->succeed("mkdir -m 700 /root/.ssh"); - $slave->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys"); - $slave->waitForJob("sshd"); - $client->succeed("ssh -o StrictHostKeyChecking=no " . $slave->name() . " 'echo hello world'"); - } - - # Perform a build and check that it was performed on the slave. - my $out = $client->succeed("nix-build ${expr nodes.client.config 1}"); - $slave1->succeed("test -e $out"); - - # And a parallel build. - my ($out1, $out2) = split /\s/, - $client->succeed("nix-store -r \$(nix-instantiate ${expr nodes.client.config 2} ${expr nodes.client.config 3})"); - $slave1->succeed("test -e $out1 -o -e $out2"); - $slave2->succeed("test -e $out1 -o -e $out2"); - - # Test whether the build hook automatically skips unavailable slaves. - $slave1->block; - $client->succeed("nix-build ${expr nodes.client.config 4}"); - ''; - -}