diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2020-12-11 09:16:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-11 09:16:56 +0100 |
commit | 9a39c1be2ccf10834a349ac92e8384fe8ef1ca27 (patch) | |
tree | ecc6eb9c9dfdf60b3dcbdebf8adc920d8ec23415 | |
parent | 901cde2623842b1246db877451c0829e12f80c48 (diff) | |
parent | d6187d51636cde418e9dc9b6f51dfb964e250c35 (diff) | |
download | nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar.gz nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar.bz2 nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar.lz nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar.xz nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.tar.zst nixpkgs-9a39c1be2ccf10834a349ac92e8384fe8ef1ca27.zip |
Merge pull request #106464 from drewrisinger/dr-pr-fast-psautohint-tests
-rw-r--r-- | pkgs/development/python-modules/afdko/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/python-modules/psautohint/default.nix | 28 |
2 files changed, 35 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index f1e3bf0cd56..6371fa804bb 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -3,7 +3,7 @@ , brotli, fontmath, mutatormath, booleanoperations , ufoprocessor, ufonormalizer, psautohint, tqdm , setuptools_scm -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -52,10 +52,18 @@ buildPythonPackage rec { # https://github.com/adobe-type-tools/afdko/issues/1163 # https://github.com/adobe-type-tools/afdko/issues/1216 doCheck = stdenv.isx86_64; - checkInputs = [ pytest ]; - checkPhase = '' - PATH="$PATH:$out/bin" py.test - ''; + checkInputs = [ pytestCheckHook ]; + preCheck = "export PATH=$PATH:$out/bin"; + disabledTests = [ + # Disable slow tests, reduces test time ~25 % + "test_report" + "test_post_overflow" + "test_cjk" + "test_extrapolate" + "test_filename_without_dir" + "test_overwrite" + "test_options" + ]; meta = with stdenv.lib; { description = "Adobe Font Development Kit for OpenType"; diff --git a/pkgs/development/python-modules/psautohint/default.nix b/pkgs/development/python-modules/psautohint/default.nix index fb9237c8934..61828ddff00 100644 --- a/pkgs/development/python-modules/psautohint/default.nix +++ b/pkgs/development/python-modules/psautohint/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, fetchFromGitHub, pythonOlder , fonttools, lxml, fs , setuptools_scm -, pytest, pytestcov, pytest_xdist, pytest-randomly +, pytestCheckHook, pytest_5, pytestcov, pytest_xdist }: buildPythonPackage rec { @@ -11,10 +11,10 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; src = fetchFromGitHub { - owner = "adobe-type-tools"; - repo = pname; + owner = "adobe-type-tools"; + repo = pname; + rev = "v${version}"; sha256 = "1s2l54gzn11y07zaggprwif7r3ia244qijjhkbvjdx4jsgc5df8n"; - rev = "v${version}"; fetchSubmodules = true; # data dir for tests }; @@ -28,8 +28,24 @@ buildPythonPackage rec { propagatedBuildInputs = [ fonttools lxml fs ]; - checkInputs = [ pytest pytestcov pytest_xdist pytest-randomly ]; - checkPhase = "pytest tests"; + checkInputs = [ + # Override pytestCheckHook to use pytest v5, because some tests fail on pytest >= v6 + # https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965 + # Override might be able to be removed in future, check package dependency pins (coverage.yml) + (pytestCheckHook.override{ pytest = pytest_5; }) + pytestcov + pytest_xdist + ]; + disabledTests = [ + # Slow tests, reduces test time from ~5 mins to ~30s + "test_mmufo" + "test_flex_ufo" + "test_ufo" + "test_flex_otf" + "test_multi_outpath" + "test_mmhint" + "test_otf" + ]; meta = with lib; { description = "Script to normalize the XML and other data inside of a UFO"; |