mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
![]() Motivation for this hook is simple: there's no single documented way to do trivial things with ctest: 1. Pass additional flags to ctest invocation. 2. Selectively disable tests in a mechanism similar to python's `disabledTests` or rust's composable skips in `checkFlags`. 3. Disable parallel checking. Current state of things has lead to several different solutions: 1. Completely overriding `checkPhase` [1] and invoking ctest manually with the necessary flags. This is most often coupled with `-E` for disabling test or setting parallel level. 2. Wrangling with weird double string/regex escaping and trying to stuff additional parameters and/or exclusion regex via `CMAKE_CTEST_ARGUMENTS`. This approach is especially painful when test names have spaces. This is the reason I originally decided to implement this hook after wrangling with failing darwin tests here [2]. 3. Stuffing additional arguments into `checkFlagsArray` with the `ARGS` makefile parameter [3]. I don't see any reason to keep the status-quo. Doing something along these lines has been suggested [4] for both `ctest` and `meson`. Meson setup-hook has switched from `ninja` to `meson` in [5] with little friction. Doing the same for cmake in a single sweep would prove problematic due to the aforementioned zoo of workarounds and hacks for `ctest`. Doing it via a separate hook would allow us to refactor things piecemeal and without going through staging. The benefit of the hook is immediately clear and it would allow to drive the refactor tractor at a comfortable pace. [1]: pd/pdal/package.nix:117, cc/ccache/package.nix:108, gl/glog/package.nix:79 [2]: https://www.github.com/NixOS/nixpkgs/pull/375955 [3]: op/open62541/package.nix:114 [4]: https://www.github.com/NixOS/nixpkgs/issues/113829 [5]: https://www.github.com/NixOS/nixpkgs/pull/213845 |
||
---|---|---|
.. | ||
autoconf.section.md | ||
automake.section.md | ||
autopatchcil.section.md | ||
autopatchelf.section.md | ||
aws-c-common.section.md | ||
bmake.section.md | ||
breakpoint.section.md | ||
cernlib.section.md | ||
cmake.section.md | ||
desktop-file-utils.section.md | ||
gdk-pixbuf.section.md | ||
ghc.section.md | ||
gnome.section.md | ||
haredo.section.md | ||
index.md | ||
installShellFiles.section.md | ||
just.section.md | ||
libiconv.section.md | ||
libxml2.section.md | ||
memcached-test-hook.section.md | ||
meson.section.md | ||
mpi-check-hook.section.md | ||
ninja.section.md | ||
patch-rc-path-hooks.section.md | ||
perl.section.md | ||
pkg-config.section.md | ||
postgresql-test-hook.section.md | ||
premake.section.md | ||
python.section.md | ||
redis-test-hook.section.md | ||
scons.section.md | ||
tauri.section.md | ||
tetex-tex-live.section.md | ||
unzip.section.md | ||
validatePkgConfig.section.md | ||
versionCheckHook.section.md | ||
waf.section.md | ||
xcbuild.section.md | ||
xfce4-dev-tools.section.md | ||
zig.section.md |