Merge pull request #326143 from pbsds/fix-anki-1720618191

anki: disable test_create_open
This commit is contained in:
Peder Bergebakken Sundt
2024-07-19 14:41:19 +02:00
committed by GitHub
+16 -3
View File
@@ -250,13 +250,26 @@ python3.pkgs.buildPythonApplication {
'';
# mimic https://github.com/ankitects/anki/blob/76d8807315fcc2675e7fa44d9ddf3d4608efc487/build/ninja_gen/src/python.rs#L232-L250
checkPhase = ''
checkPhase = let
disabledTestsString = lib.pipe [
# assumes / is not writeable, somehow fails on nix-portable brwap
"test_create_open"
] [
(lib.map (test: "not ${test}"))
(lib.concatStringsSep " and ")
lib.escapeShellArg
];
in ''
runHook preCheck
HOME=$TMP ANKI_TEST_MODE=1 PYTHONPATH=$PYTHONPATH:$PWD/out/pylib \
pytest -p no:cacheprovider pylib/tests
pytest -p no:cacheprovider pylib/tests -k ${disabledTestsString}
HOME=$TMP ANKI_TEST_MODE=1 PYTHONPATH=$PYTHONPATH:$PWD/out/pylib:$PWD/pylib:$PWD/out/qt \
pytest -p no:cacheprovider qt/tests
pytest -p no:cacheprovider qt/tests -k ${disabledTestsString}
runHook postCheck
'';
preInstall = ''
mkdir dist
mv out/wheels/* dist