From 2601a80639ecee27fdb83ce099c037a348ba7125 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 17 May 2017 16:07:04 -0400 Subject: [PATCH] release-cross: Make tests more uniform Fewer packages are only built on one platform. Eventually we should have each package encode its own requirements on build host and target (as we do for build already) and use that to test automatically. --- pkgs/top-level/release-cross.nix | 67 ++++++++++++++------------------ 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 861b3abe1ad..31ce31a6759 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -12,31 +12,29 @@ with import ./release-lib.nix { inherit supportedSystems scrubJobs; }; let nativePlatforms = linux; - /* Basic list of packages to cross-build */ - basicCrossDrv = { + common = { + buildPackages.binutils = nativePlatforms; + gmp = nativePlatforms; + }; + + gnuCommon = common // { + buildPackages.gccCrossStageFinal = nativePlatforms; + coreutils = nativePlatforms; + }; + + linuxCommon = gnuCommon // { + buildPackages.gdbCross = nativePlatforms; + bison = nativePlatforms; busybox = nativePlatforms; - coreutils = nativePlatforms; dropbear = nativePlatforms; + ed = nativePlatforms; + ncurses = nativePlatforms; + patch = nativePlatforms; }; - /* Basic list of packages to be natively built, - but need a crossSystem defined to get meaning */ - basicNativeDrv = { - buildPackages.binutils = nativePlatforms; - buildPackages.gccCrossStageFinal = nativePlatforms; - buildPackages.gdbCross = nativePlatforms; - }; - - basic = basicCrossDrv // basicNativeDrv; - - windows = { - buildPackages.binutils = nativePlatforms; - buildPackages.gccCrossStageFinal = nativePlatforms; - - coreutils = nativePlatforms; + windowsCommon = gnuCommon // { boehmgc = nativePlatforms; - gmp = nativePlatforms; guile_1_8 = nativePlatforms; libffi = nativePlatforms; libtool = nativePlatforms; @@ -44,6 +42,10 @@ let windows.wxMSW = nativePlatforms; }; + darwinCommon = { + buildPackages.binutils = darwin; + }; + in { @@ -92,9 +94,7 @@ in arch = "arm64"; libc = "libSystem"; }; - in mapTestOnCross crossSystem { - buildPackages.binutils = darwin; - }; + in mapTestOnCross crossSystem darwinCommon; darwinToArm = let crossSystem = { @@ -102,9 +102,7 @@ in arch = "armv7-a"; libc = "libSystem"; }; - in mapTestOnCross crossSystem { - buildPackages.binutils = darwin; - }; + in mapTestOnCross crossSystem darwinCommon; /* Test some cross builds to the Sheevaplug */ crossSheevaplugLinux = let @@ -118,7 +116,7 @@ in libc = "glibc"; openssl.system = "linux-generic32"; }; - in mapTestOnCross crossSystem (basic // { + in mapTestOnCross crossSystem (linuxCommon // { ubootSheevaplug = nativePlatforms; }); @@ -131,7 +129,7 @@ in libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem windows; + in mapTestOnCross crossSystem windowsCommon; /* Test some cross builds on 64 bit mingw-w64 */ @@ -143,7 +141,7 @@ in libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain platform = {}; }; - in mapTestOnCross crossSystem windows; + in mapTestOnCross crossSystem windowsCommon; /* Linux on the fuloong */ @@ -162,11 +160,7 @@ in abi = "n32"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; - }; + in mapTestOnCross crossSystem linuxCommon; /* Linux on Raspberrypi */ @@ -188,10 +182,7 @@ in abi = "aapcs-linux"; }; }; - in mapTestOnCross crossSystem { - coreutils = nativePlatforms; - ed = nativePlatforms; - patch = nativePlatforms; + in mapTestOnCross crossSystem (linuxCommon // { vim = nativePlatforms; unzip = nativePlatforms; ddrescue = nativePlatforms; @@ -199,7 +190,7 @@ in patchelf = nativePlatforms; buildPackages.binutils = nativePlatforms; mpg123 = nativePlatforms; - }; + }); /* Cross-built bootstrap tools for every supported platform */