Skip to content

Commit 49913c3

Browse files
committed
Test tidy up
1 parent ee89d8c commit 49913c3

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

test/cabal-simple-debug/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ let
1212
packages = project.hsPkgs;
1313

1414
in recurseIntoAttrs {
15+
# DWARF only works on linux with GHC 8.10.2 and newer
16+
meta.disabled = __elem compiler-nix-name ["ghc865" "ghc884"]
17+
|| !stdenv.hostPlatform.isLinux || haskellLib.isCrossHost || stdenv.hostPlatform.isMusl;
1518
ifdInputs = {
1619
inherit (project) plan-nix;
1720
};
@@ -34,9 +37,6 @@ in recurseIntoAttrs {
3437

3538
meta = {
3639
platforms = platforms.all;
37-
# DWARF only works on linux with GHC 8.10.2 and newer
38-
disabled = compiler-nix-name == "ghc865" || compiler-nix-name == "ghc884"
39-
|| !stdenv.hostPlatform.isLinux || haskellLib.isCrossHost || stdenv.hostPlatform.isMusl;
4040
};
4141

4242
passthru = {

test/default.nix

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ let
162162
# All tests.
163163
allTests = {
164164
cabal-simple = callTest ./cabal-simple { inherit util compiler-nix-name; };
165+
cabal-simple-debug = callTest ./cabal-simple-debug { inherit util compiler-nix-name; };
165166
cabal-simple-prof = callTest ./cabal-simple-prof { inherit util compiler-nix-name; };
166167
cabal-sublib = callTest ./cabal-sublib { inherit util compiler-nix-name; };
167168
with-packages = callTest ./with-packages { inherit util; };
@@ -189,6 +190,8 @@ let
189190
hls-stack = callTest ./haskell-language-server/stack.nix { inherit compiler-nix-name; };
190191
cabal-hpack = callTest ./cabal-hpack { inherit util compiler-nix-name; };
191192
index-state = callTest ./index-state { inherit compiler-nix-name; };
193+
lookup-sha256 = callTest ./lookup-sha256 { inherit compiler-nix-name; };
194+
# fully-static = callTest ./fully-static { inherit (pkgs) buildPackages; };
192195

193196
unit = unitTests;
194197
} // lib.optionalAttrs (!stdenv.hostPlatform.isGhcjs && !stdenv.hostPlatform.isWindows) {
@@ -200,26 +203,17 @@ let
200203
# ReferenceError: h$hs_clock_darwin_gettime is not defined
201204
# https://github.com/input-output-hk/haskell.nix/issues/925
202205
cabal-22 = callTest ./cabal-22 { inherit util compiler-nix-name; };
203-
} // lib.optionalAttrs (!stdenv.hostPlatform.isGhcjs) {
204206
# These do not work on ghcjs because it needs zlib.
205207
coverage = callTest ./coverage { inherit compiler-nix-name; };
206208
coverage-golden = callTest ./coverage-golden { inherit compiler-nix-name;};
207209
coverage-no-libs = callTest ./coverage-no-libs { inherit compiler-nix-name; };
208210
snapshots = callTest ./snapshots {};
209-
} // lib.optionalAttrs (!stdenv.hostPlatform.isGhcjs && builtins.compareVersions pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "8.10" < 0) {
210-
# Tha version of pandoc used in this test does not build with ghcjs or ghc 8.10 (lookup-sha256 and fully-static build pandoc)
211-
lookup-sha256 = callTest ./lookup-sha256 { inherit compiler-nix-name; };
212-
# fully-static = callTest ./fully-static { inherit (pkgs) buildPackages; };
213211
} // lib.optionalAttrs (!pkgs.haskell-nix.haskellLib.isCrossHost) {
214212
# Haddock is not included with cross compilers currently
215213
sublib-docs = callTest ./sublib-docs { inherit util compiler-nix-name; };
216214
# githash runs git from TH code and this needs a cross compiled git exe
217215
# to work correctly. Cross compiling git is currently brocken.
218216
githash = haskell-nix.callPackage ./githash { inherit compiler-nix-name; testSrc = testSrcWithGitDir; };
219-
} // lib.optionalAttrs (
220-
stdenv.hostPlatform.isLinux && !pkgs.haskell-nix.haskellLib.isCrossHost && !stdenv.hostPlatform.isMusl
221-
&& !(__elem compiler-nix-name ["ghc865" "ghc884"])) {
222-
cabal-simple-debug = callTest ./cabal-simple-debug { inherit util compiler-nix-name; };
223217
};
224218

225219
# This is the same as allTests, but filter out all the key/vaules from the

test/lookup-sha256/default.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{ pkgs, lib, stdenv, haskell-nix, testSrc, zlib, compiler-nix-name } :
2-
# A dependency is broken on windows, just run this on unix.
3-
lib.addMetaAttrs { platforms = lib.platforms.unix; } ((haskell-nix.hackage-package {
2+
lib.addMetaAttrs {
3+
# A dependency is broken on windows, just run this on unix.
4+
platforms = lib.platforms.unix;
5+
# The version of pandoc used in this test does not build with ghcjs or ghc 8.10
6+
disabled = stdenv.hostPlatform.isGhcjs
7+
|| builtins.compareVersions pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}.version "8.10" >= 0;
8+
} ((haskell-nix.hackage-package {
49
inherit compiler-nix-name;
510
name = "pandoc";
611
version = "2.9.2.1";

0 commit comments

Comments
 (0)