Skip to content

Commit c294115

Browse files
authored
{mkcal,lib2geom}: use ctestCheckHook, openmvs: remove redundant check phase (#415713)
2 parents 28a213f + 1ec7298 commit c294115

File tree

3 files changed

+34
-52
lines changed

3 files changed

+34
-52
lines changed

pkgs/applications/science/misc/openmvs/default.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ stdenv.mkDerivation rec {
6868
'';
6969

7070
doCheck = true;
71-
checkPhase = ''
72-
runHook preCheck
73-
ctest
74-
runHook postCheck
75-
'';
7671

7772
meta = {
7873
description = "Open Multi-View Stereo reconstruction library";

pkgs/by-name/li/lib2geom/package.nix

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
cairo,
1111
double-conversion,
1212
gtest,
13+
ctestCheckHook,
1314
lib,
1415
inkscape,
1516
pkgsCross,
@@ -47,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
4748

4849
nativeCheckInputs = [
4950
gtest
51+
ctestCheckHook
5052
];
5153

5254
cmakeFlags = [
@@ -56,41 +58,32 @@ stdenv.mkDerivation (finalAttrs: {
5658
];
5759

5860
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
61+
dontUseNinjaCheck = true;
62+
disabledTests =
63+
lib.optionals stdenv.hostPlatform.isMusl [
64+
# Fails due to rounding differences
65+
# https://gitlab.com/inkscape/lib2geom/-/issues/70
66+
"circle-test"
67+
]
68+
++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [
69+
# Broken on all platforms, test just accidentally passes on some.
70+
# https://gitlab.com/inkscape/lib2geom/-/issues/63
71+
"elliptical-arc-test"
5972

60-
# TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
61-
checkPhase =
62-
let
63-
disabledTests =
64-
lib.optionals stdenv.hostPlatform.isMusl [
65-
# Fails due to rounding differences
66-
# https://gitlab.com/inkscape/lib2geom/-/issues/70
67-
"circle-test"
68-
]
69-
++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [
70-
# Broken on all platforms, test just accidentally passes on some.
71-
# https://gitlab.com/inkscape/lib2geom/-/issues/63
72-
"elliptical-arc-test"
73+
# https://gitlab.com/inkscape/lib2geom/-/issues/69
74+
"polynomial-test"
7375

74-
# https://gitlab.com/inkscape/lib2geom/-/issues/69
75-
"polynomial-test"
76+
# https://gitlab.com/inkscape/lib2geom/-/issues/75
77+
"line-test"
7678

77-
# https://gitlab.com/inkscape/lib2geom/-/issues/75
78-
"line-test"
79+
# Failure observed on i686
80+
"angle-test"
81+
"self-intersections-test"
7982

80-
# Failure observed on i686
81-
"angle-test"
82-
"self-intersections-test"
83-
84-
# Failure observed on aarch64-darwin
85-
"bezier-test"
86-
"ellipse-test"
87-
];
88-
in
89-
''
90-
runHook preCheck
91-
ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
92-
runHook postCheck
93-
'';
83+
# Failure observed on aarch64-darwin
84+
"bezier-test"
85+
"ellipse-test"
86+
];
9487

9588
passthru = {
9689
tests = {

pkgs/by-name/mk/mkcal/package.nix

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
perl,
1313
pkg-config,
1414
tzdata,
15+
ctestCheckHook,
1516
}:
1617

1718
stdenv.mkDerivation (finalAttrs: {
@@ -62,32 +63,25 @@ stdenv.mkDerivation (finalAttrs: {
6263

6364
nativeCheckInputs = [
6465
tzdata
66+
ctestCheckHook
6567
];
6668

6769
cmakeFlags = [
6870
(lib.cmakeBool "BUILD_PLUGINS" false)
6971
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
7072
(lib.cmakeBool "INSTALL_TESTS" false)
7173
(lib.cmakeBool "BUILD_DOCUMENTATION" true)
72-
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (
73-
lib.concatStringsSep ";" [
74-
# Exclude tests
75-
"-E"
76-
(lib.strings.escapeShellArg "(${
77-
lib.concatStringsSep "|" [
78-
# Test expects to be passed a real, already existing database to test migrations. We don't have one
79-
"tst_perf"
80-
81-
# 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone
82-
# Other half are x-1/x on lists of alarms/events
83-
"tst_storage"
84-
]
85-
})")
86-
]
87-
))
8874
];
8975

9076
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
77+
disabledTests = [
78+
# Test expects to be passed a real, already existing database to test migrations. We don't have one
79+
"tst_perf"
80+
81+
# 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone
82+
# Other half are x-1/x on lists of alarms/events
83+
"tst_storage"
84+
];
9185

9286
# Parallelism breaks tests
9387
enableParallelChecking = false;

0 commit comments

Comments
 (0)