From 67c692b648da03c6713a05ea9fc97b5dc26587b7 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 25 Jun 2020 21:02:49 +0200 Subject: [PATCH] Add test subset --- default.nix | 22 +++++++++++++--------- test/compilers/clang-ompss2.nix | 2 +- test/security/internet.nix | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 test/security/internet.nix diff --git a/default.nix b/default.nix index aad0972..d7a4aab 100644 --- a/default.nix +++ b/default.nix @@ -54,9 +54,6 @@ let dummy = callPackage ./bsc/dummy/default.nix { }; - chroot = callPackage ./test/chroot.nix { - }; - clang-ompss2-unwrapped = callPackage ./bsc/llvm-ompss2/clang.nix { stdenv = pkgs.llvmPackages_10.stdenv; }; @@ -70,18 +67,13 @@ let cc = clang-ompss2; }; - test-clang-ompss2 = callPackage ./test/compilers/clang-ompss2.nix { - stdenv = stdenv-nanos6; - nanos6 = nanos6-git; - inherit clang-ompss2; - }; - cpic = callPackage ./bsc/cpic/default.nix { stdenv = stdenv-nanos6; nanos6 = nanos6-git; inherit mpi tampi; }; + # Patched nix for deep cluster inherit (callPackage ./bsc/nix/default.nix { storeDir = "/nix/store"; stateDir = "/nix/var"; @@ -90,6 +82,18 @@ let nix nixUnstable nixFlakes; + + test = { + chroot = callPackage ./test/chroot.nix { }; + + internet = callPackage ./test/security/internet.nix { }; + + clang-ompss2 = callPackage ./test/compilers/clang-ompss2.nix { + stdenv = stdenv-nanos6; + nanos6 = nanos6-git; + inherit clang-ompss2; + }; + }; }; in pkgs // self diff --git a/test/compilers/clang-ompss2.nix b/test/compilers/clang-ompss2.nix index 6fe0e45..db7e820 100644 --- a/test/compilers/clang-ompss2.nix +++ b/test/compilers/clang-ompss2.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { buildInputs = [ clang-ompss2 nanos6 ]; buildPhase = '' - export NIX_DEBUG=6 + #export NIX_DEBUG=6 clang -fompss-2 hello.c -o hello ./hello clang -fompss-2 hello.cc -o hello diff --git a/test/security/internet.nix b/test/security/internet.nix new file mode 100644 index 0000000..3fa4be3 --- /dev/null +++ b/test/security/internet.nix @@ -0,0 +1,20 @@ +{stdenv, curl, coreutils}: + +stdenv.mkDerivation rec { + version = "0.0.1"; + name = "internet-test"; + src = ./internet.nix; + dontUnpack = true; + buildInputs = [ curl coreutils ]; + buildPhase = '' + cat /proc/self/mounts + ls -l /proc + ls -l / + ip addr + ${curl}/bin/curl https://www.bsc.es/ + ''; + + installPhase = '' + mkdir -p $out + ''; +}