{mkcal,lib2geom}: use ctestCheckHook, openmvs: remove redundant check phase (#415713)
This commit is contained in:
@@ -68,11 +68,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
ctest
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Open Multi-View Stereo reconstruction library";
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
cairo,
|
||||
double-conversion,
|
||||
gtest,
|
||||
ctestCheckHook,
|
||||
lib,
|
||||
inkscape,
|
||||
pkgsCross,
|
||||
@@ -47,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeCheckInputs = [
|
||||
gtest
|
||||
ctestCheckHook
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
@@ -56,41 +58,32 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
dontUseNinjaCheck = true;
|
||||
disabledTests =
|
||||
lib.optionals stdenv.hostPlatform.isMusl [
|
||||
# Fails due to rounding differences
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/70
|
||||
"circle-test"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [
|
||||
# Broken on all platforms, test just accidentally passes on some.
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/63
|
||||
"elliptical-arc-test"
|
||||
|
||||
# TODO: Update cmake hook to make it simpler to selectively disable cmake tests: #113829
|
||||
checkPhase =
|
||||
let
|
||||
disabledTests =
|
||||
lib.optionals stdenv.hostPlatform.isMusl [
|
||||
# Fails due to rounding differences
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/70
|
||||
"circle-test"
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.system != "x86_64-linux") [
|
||||
# Broken on all platforms, test just accidentally passes on some.
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/63
|
||||
"elliptical-arc-test"
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/69
|
||||
"polynomial-test"
|
||||
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/69
|
||||
"polynomial-test"
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/75
|
||||
"line-test"
|
||||
|
||||
# https://gitlab.com/inkscape/lib2geom/-/issues/75
|
||||
"line-test"
|
||||
# Failure observed on i686
|
||||
"angle-test"
|
||||
"self-intersections-test"
|
||||
|
||||
# Failure observed on i686
|
||||
"angle-test"
|
||||
"self-intersections-test"
|
||||
|
||||
# Failure observed on aarch64-darwin
|
||||
"bezier-test"
|
||||
"ellipse-test"
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preCheck
|
||||
ctest --output-on-failure -E '^${lib.concatStringsSep "|" disabledTests}$'
|
||||
runHook postCheck
|
||||
'';
|
||||
# Failure observed on aarch64-darwin
|
||||
"bezier-test"
|
||||
"ellipse-test"
|
||||
];
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
perl,
|
||||
pkg-config,
|
||||
tzdata,
|
||||
ctestCheckHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -62,6 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeCheckInputs = [
|
||||
tzdata
|
||||
ctestCheckHook
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
@@ -69,25 +71,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeBool "INSTALL_TESTS" false)
|
||||
(lib.cmakeBool "BUILD_DOCUMENTATION" true)
|
||||
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (
|
||||
lib.concatStringsSep ";" [
|
||||
# Exclude tests
|
||||
"-E"
|
||||
(lib.strings.escapeShellArg "(${
|
||||
lib.concatStringsSep "|" [
|
||||
# Test expects to be passed a real, already existing database to test migrations. We don't have one
|
||||
"tst_perf"
|
||||
|
||||
# 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone
|
||||
# Other half are x-1/x on lists of alarms/events
|
||||
"tst_storage"
|
||||
]
|
||||
})")
|
||||
]
|
||||
))
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
disabledTests = [
|
||||
# Test expects to be passed a real, already existing database to test migrations. We don't have one
|
||||
"tst_perf"
|
||||
|
||||
# 10/97 tests fail. Half seem related to time (zone) issues w/ local time / Helsinki timezone
|
||||
# Other half are x-1/x on lists of alarms/events
|
||||
"tst_storage"
|
||||
];
|
||||
|
||||
# Parallelism breaks tests
|
||||
enableParallelChecking = false;
|
||||
|
||||
Reference in New Issue
Block a user