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.rbtools: fix tests #57258

Merged
merged 1 commit into from Mar 12, 2019
Merged

pythonPackages.rbtools: fix tests #57258

merged 1 commit into from Mar 12, 2019

Conversation

c0deaddict
Copy link
Member

Motivation for this change

rbtools was broken, in the checkPhase it could not find the nosetests executable.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

propagatedBuildInputs = [ six ];

checkPhase = "nosetests";
checkPhase = "LC_ALL=C nosetests";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was setting LC_ALL needed?
We have 1fccd25

Copy link
Member Author

Choose a reason for hiding this comment

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

A test failed without it:

running install tests
..........E..........................SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.................SSSSSSSSSSSSSSSSSSS...............
======================================================================
ERROR: Testing the cache with the Expires header in the future
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/RBTools-0.7.2/rbtools/api/tests.py", line 782, in test_expires_header_future
    locale.resetlocale(locale.LC_TIME)
  File "/nix/store/ih03q5vi6kj278l4jk4kh41lqyagzzdi-python-2.7.15/lib/python2.7/locale.py", line 591, in resetlocale
    _setlocale(category, _build_localename(getdefaultlocale()))
Error: unsupported locale setting

When I run it with "LC_ALL=C.UTF-8 nosetests" it fails, with LC_ALL=C it doesn't. I have no idea why.

@xeji
Copy link
Contributor

xeji commented Mar 12, 2019

@GrahamcOfBorg build python27Packages.rbtools

@xeji
Copy link
Contributor

xeji commented Mar 12, 2019

needs backport to 19.03, /cc #56826

@xeji xeji merged commit 382abc9 into NixOS:master Mar 12, 2019
xeji pushed a commit that referenced this pull request Mar 12, 2019
@xeji
Copy link
Contributor

xeji commented Mar 12, 2019

picked to 19.03 in c4f45df

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

4 participants