mkcal: use ctestCheckHook
This greatly simplifies the test skipping code.
This commit is contained in:
@@ -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