about summary refs log tree commit diff
path: root/tests/sandbox.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-12-19T10·52+0100
committerEelco Dolstra <edolstra@gmail.com>2016-12-19T10·52+0100
commit3a4bd320c2c4043a4b1f73406030e9afc0677b59 (patch)
tree8901d77af1d0231783274f02e340101329df02a9 /tests/sandbox.nix
parent11f0680f69ffd12ac036040a2395f31b11fabd1f (diff)
Revert "Merge branch 'seccomp' of https://github.com/aszlig/nix"
This reverts commit 9f3f2e21edb17dbcd674539dff96efb6cceca10c, reversing
changes made to 47f587700d646f5b03a42f2fa57c28875a31efbe.
Diffstat (limited to 'tests/sandbox.nix')
-rw-r--r--tests/sandbox.nix54
1 files changed, 0 insertions, 54 deletions
diff --git a/tests/sandbox.nix b/tests/sandbox.nix
deleted file mode 100644
index dc72a5985ef7..000000000000
--- a/tests/sandbox.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-# Test Nix builder sandbox.
-
-{ system, nix }:
-
-with import <nixpkgs/nixos/lib/testing.nix> { inherit system; };
-
-let
-  mkUtils = pkgs: pkgs.buildEnv {
-    name = "sandbox-utils";
-    paths = [ pkgs.coreutils pkgs.utillinux pkgs.bash ];
-    pathsToLink = [ "/bin" "/sbin" ];
-  };
-
-  utils32 = mkUtils pkgs.pkgsi686Linux;
-  utils64 = mkUtils pkgs;
-
-  sandboxTestScript = pkgs.writeText "sandbox-testscript.sh" ''
-    [ $(id -u) -eq 0 ]
-    cp -p "$testfile" foo
-    chown 1024:1024 foo
-    touch "$out"
-  '';
-
-  testExpr = arch: pkgs.writeText "sandbox-test.nix" ''
-    let
-      utils = builtins.storePath
-        ${if arch == "i686-linux" then utils32 else utils64};
-    in derivation {
-      name = "sandbox-test";
-      system = "${arch}";
-      builder = "''${utils}/bin/bash";
-      args = ["-e" ${sandboxTestScript}];
-      PATH = "''${utils}/bin";
-      testfile = builtins.toFile "test" "i am a test file";
-    }
-  '';
-
-in makeTest {
-  name = "nix-sandbox";
-
-  machine = { pkgs, ... }: {
-    nix.package = nix;
-    nix.useSandbox = true;
-    nix.binaryCaches = [];
-    virtualisation.writableStore = true;
-    virtualisation.pathsInNixDB = [ utils32 utils64 ];
-  };
-
-  testScript = ''
-    $machine->waitForUnit("multi-user.target");
-    $machine->succeed("nix-build ${testExpr "x86_64-linux"}");
-    $machine->succeed("nix-build ${testExpr "i686-linux"}");
-  '';
-}