cross/tests: add llvm-based tests
This commit is contained in:
parent
b86e62d30d
commit
8e25da0beb
@ -101,7 +101,7 @@ rec {
|
|||||||
in
|
in
|
||||||
if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name &&
|
if final.parsed.kernel.name == pkgs.stdenv.hostPlatform.parsed.kernel.name &&
|
||||||
pkgs.stdenv.hostPlatform.isCompatible final
|
pkgs.stdenv.hostPlatform.isCompatible final
|
||||||
then pkgs.runtimeShell
|
then "${pkgs.runtimeShell} -c"
|
||||||
else if final.isWindows
|
else if final.isWindows
|
||||||
then "${wine}/bin/${wine-name}"
|
then "${wine}/bin/${wine-name}"
|
||||||
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux
|
else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux
|
||||||
|
@ -53,10 +53,10 @@ let
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mapMultiPlatformTest = test: lib.mapAttrs (name: system: test rec {
|
mapMultiPlatformTest = crossSystemFun: test: lib.mapAttrs (name: system: test rec {
|
||||||
crossPkgs = import pkgs.path {
|
crossPkgs = import pkgs.path {
|
||||||
localSystem = { inherit (pkgs.hostPlatform) config; };
|
localSystem = { inherit (pkgs.hostPlatform) config; };
|
||||||
crossSystem = system;
|
crossSystem = crossSystemFun system;
|
||||||
};
|
};
|
||||||
|
|
||||||
emulator = crossPkgs.hostPlatform.emulator pkgs;
|
emulator = crossPkgs.hostPlatform.emulator pkgs;
|
||||||
@ -71,9 +71,7 @@ let
|
|||||||
} else pkg;
|
} else pkg;
|
||||||
}) testedSystems;
|
}) testedSystems;
|
||||||
|
|
||||||
in
|
tests = {
|
||||||
|
|
||||||
lib.mapAttrs (_: mapMultiPlatformTest) {
|
|
||||||
|
|
||||||
file = {platformFun, crossPkgs, emulator}: compareTest {
|
file = {platformFun, crossPkgs, emulator}: compareTest {
|
||||||
inherit emulator crossPkgs;
|
inherit emulator crossPkgs;
|
||||||
@ -93,4 +91,10 @@ lib.mapAttrs (_: mapMultiPlatformTest) {
|
|||||||
pkgFun = pkgs: pkgs.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)
|
||||||
|
Loading…
Reference in New Issue
Block a user