summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-02-25 22:54:40 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2019-02-26 19:46:24 -0500
commit8e25da0beb7d5c1af2d8de053044ab7b2588a0bd (patch)
tree02245736c989cfd10224ce30804346679c59e11d /pkgs/test
parentb86e62d30d4635ef3294d9c1c308f9c8b0061045 (diff)
downloadnixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar.gz
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar.bz2
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar.lz
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar.xz
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.tar.zst
nixpkgs-8e25da0beb7d5c1af2d8de053044ab7b2588a0bd.zip
cross/tests: add llvm-based tests
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/cross/default.nix46
1 files changed, 25 insertions, 21 deletions
diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix
index a907b9e2d45..5d9c120c501 100644
--- a/pkgs/test/cross/default.nix
+++ b/pkgs/test/cross/default.nix
@@ -53,10 +53,10 @@ let
     fi
   '';
 
-  mapMultiPlatformTest = test: lib.mapAttrs (name: system: test rec {
+  mapMultiPlatformTest = crossSystemFun: test: lib.mapAttrs (name: system: test rec {
     crossPkgs = import pkgs.path {
       localSystem = { inherit (pkgs.hostPlatform) config; };
-      crossSystem = system;
+      crossSystem = crossSystemFun system;
     };
 
     emulator = crossPkgs.hostPlatform.emulator pkgs;
@@ -71,26 +71,30 @@ let
       } else pkg;
   }) testedSystems;
 
-in
-
-lib.mapAttrs (_: mapMultiPlatformTest) {
+  tests = {
+
+    file = {platformFun, crossPkgs, emulator}: compareTest {
+      inherit emulator crossPkgs;
+      hostPkgs = pkgs;
+      exec = "/bin/file";
+      args = [
+        "${pkgs.file}/share/man/man1/file.1.gz"
+        "${pkgs.dejavu_fonts}/share/fonts/truetype/DejaVuMathTeXGyre.ttf"
+      ];
+      pkgFun = pkgs: platformFun pkgs.file;
+    };
 
-  file = {platformFun, crossPkgs, emulator}: compareTest {
-    inherit emulator crossPkgs;
-    hostPkgs = pkgs;
-    exec = "/bin/file";
-    args = [
-      "${pkgs.file}/share/man/man1/file.1.gz"
-      "${pkgs.dejavu_fonts}/share/fonts/truetype/DejaVuMathTeXGyre.ttf"
-    ];
-    pkgFun = pkgs: platformFun pkgs.file;
-  };
+    hello = {platformFun, crossPkgs, emulator}: compareTest {
+      inherit emulator crossPkgs;
+      hostPkgs = pkgs;
+      exec = "/bin/hello";
+      pkgFun = pkgs: pkgs.hello;
+    };
 
-  hello = {platformFun, crossPkgs, emulator}: compareTest {
-    inherit emulator crossPkgs;
-    hostPkgs = pkgs;
-    exec = "/bin/hello";
-    pkgFun = pkgs: pkgs.hello;
   };
 
-}
+in (lib.mapAttrs (_: mapMultiPlatformTest builtins.id) tests)
+// (lib.mapAttrs' (name: test: {
+    name = "${name}-llvm";
+    value = mapMultiPlatformTest (system: system // {useLLVM = true;}) test;
+  }) tests)