calendar-cli: run tests

This commit is contained in:
Robert Schütz
2025-12-03 10:44:32 -08:00
parent ba005384fe
commit 32fb293e6b
+27 -2
View File
@@ -3,6 +3,10 @@
python3,
fetchFromGitHub,
nixosTests,
perl,
radicale,
which,
xandikos,
}:
python3.pkgs.buildPythonApplication rec {
@@ -17,6 +21,13 @@ python3.pkgs.buildPythonApplication rec {
hash = "sha256-w35ySLnfxXZR/a7BrPLYqXs2kqkuYhh5PcgNxJqjDtE=";
};
postPatch = ''
patchShebangs tests
substituteInPlace tests/test_calendar-cli.sh \
--replace-fail "../bin/calendar-cli.py" "$out/bin/calendar-cli" \
--replace-fail "../bin/calendar-cli" "$out/bin/calendar-cli"
'';
build-system = with python3.pkgs; [
setuptools
];
@@ -31,8 +42,22 @@ python3.pkgs.buildPythonApplication rec {
six
];
# tests require networking
doCheck = false;
nativeCheckInputs = [
perl
(python3.pkgs.toPythonModule (radicale.override { inherit python3; }))
which
xandikos
];
checkPhase = ''
runHook preCheck
pushd tests
./test_calendar-cli.sh
popd
runHook postCheck
'';
passthru.tests = {
inherit (nixosTests) radicale;