Skip to content

Commit 3eea054

Browse files
committed
Fix for pkgsStatic code coverage file locations
1 parent 2d73267 commit 3eea054

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/coverage/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ let
2323

2424
exeExt = stdenv.hostPlatform.extensions.executable;
2525
crossSuffix = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-${stdenv.hostPlatform.config}";
26+
crossSuffix' = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isStatic) "-static-${stdenv.hostPlatform.config}";
2627

2728
in recurseIntoAttrs ({
2829
# Does not work on ghcjs because it needs zlib.
@@ -91,7 +92,7 @@ in recurseIntoAttrs ({
9192
dirExists "$pkga_basedir/html/pkga-0.1.0.0"
9293
9394
pkgb_basedir="${project.hsPkgs.pkgb.coverageReport}/share/hpc/vanilla"
94-
testTix="$pkgb_basedir/tix/pkgb-test-tests${crossSuffix}-0.1.0.0-check${crossSuffix}/tests${exeExt}.tix"
95+
testTix="$pkgb_basedir/tix/pkgb-test-tests${crossSuffix'}-0.1.0.0-check${crossSuffix}/tests${exeExt}.tix"
9596
libTix="$pkgb_basedir/tix/pkgb-0.1.0.0/pkgb-0.1.0.0.tix"
9697
fileExistsNonEmpty "$testTix"
9798
fileExistsNonEmpty "$libTix"
@@ -118,8 +119,8 @@ in recurseIntoAttrs ({
118119
dirExists "$project_basedir/tix/pkga-0.1.0.0${inplaceSuffix}"
119120
dirExists "$project_basedir/tix/pkgb-0.1.0.0${inplaceSuffix}"
120121
fileExistsNonEmpty "$project_basedir/tix/pkgb-0.1.0.0${inplaceSuffix}/pkgb-0.1.0.0${inplaceSuffix}.tix"
121-
dirExists "$project_basedir/tix/pkgb-test-tests${crossSuffix}-0.1.0.0-check${crossSuffix}"
122-
fileExistsNonEmpty "$project_basedir/tix/pkgb-test-tests${crossSuffix}-0.1.0.0-check${crossSuffix}/tests${exeExt}.tix"
122+
dirExists "$project_basedir/tix/pkgb-test-tests${crossSuffix'}-0.1.0.0-check${crossSuffix}"
123+
fileExistsNonEmpty "$project_basedir/tix/pkgb-test-tests${crossSuffix'}-0.1.0.0-check${crossSuffix}/tests${exeExt}.tix"
123124
'';
124125
in ''
125126
${check cabalProj "-inplace"}

0 commit comments

Comments
 (0)