Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.pyopenssl: Disable some tests, for libressl support. #46072

Merged
merged 3 commits into from Sep 6, 2018

Conversation

qolii
Copy link
Contributor

@qolii qolii commented Sep 4, 2018

Motivation for this change

pyopenssl fails its test phase if built against libressl (2.7 and 2.8). Disabling these 12 tests (as already done for 2 existing tests) fixes that. The remaining 483 tests pass as expected.

I filed an upstream ticket with the pyopenssl project, so we can reverse this if and when they fix it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Sep 5, 2018

Please rebase this on the staging branche since it causes a mass rebuild.

sed -i 's/test_set_session_id_fail/noop/' tests/test_ssl.py
sed -i 's/test_verify_with_revoked/noop/' tests/test_crypto.py
sed -i 's/test_set_notAfter/noop/' tests/test_crypto.py
sed -i 's/test_set_notBefore/noop/' tests/test_crypto.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an alternative with so many test failures, it might be also possible to set doCheck = openssl != libressl until it is fixed upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting. What would you recommend: should I make the derivation accept libressl as well, and do a literal != comparison between the openssl and libressl attributes?

@oxij
Copy link
Member

oxij commented Sep 5, 2018 via email

@qolii qolii changed the base branch from master to staging September 5, 2018 19:59
@oxij
Copy link
Member

oxij commented Sep 5, 2018 via email

@qolii
Copy link
Contributor Author

qolii commented Sep 6, 2018

I would do lib.hasPrefix "libressl" openssl.meta.name

That is amazing! I didn't know about that. Thanks.

I've redone everything. Is this more like it? It now only disables tests as necessary (@oxij), and uses pytest's -k option to disable the tests instead (@Mic92).

@Mic92 Mic92 changed the title pyopenssl: Disable some tests, for libressl support. pythonPackages.pyopenssl: Disable some tests, for libressl support. Sep 6, 2018
@Mic92 Mic92 merged commit 9f0efc0 into NixOS:staging Sep 6, 2018
@qolii
Copy link
Contributor Author

qolii commented Sep 6, 2018

Thanks, @Mic92!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants