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

python3Packages.fsspec: fix tests on linux #99178

Merged
merged 1 commit into from Sep 30, 2020

Conversation

tricktron
Copy link
Member

Motivation for this change

ZHF: #97479

cc: @NixOS/nixos-release-managers

Hydra fails with a DirectoryError: [Errno 21] Is a directory: '/build/source/fsspec/tests/__pycache__'.
I suspect that both drvs python37Packages.fsspec and python38Packages.fsspec share the same folder/file
'/build/source/fsspec/tests/__pycache__' which leads to problems. To fix it I just let each drvs run in a
tmp directory using pytestFlagsArray = [ "--rootdir=$(mktemp -d)" ];.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Hydra fails with a `DirectoryError: [Errno 21] Is a directory: '/build/source/fsspec/tests/__pycache__'`.
I suspect that both drvs `python37Packages.fsspec` and `python38Packages.fsspec` share the same folder
`'/build/source/fsspec/tests/__pycache__'` which leads to problems. To fix it I just let each drvs run in a
tmp directory using `pytestFlagsArray = [ "--rootdir=$(mktemp -d)" ];`.
@tricktron
Copy link
Member Author

@jonringer fsspec still doesn't want to build on hydra but I am getting there😃. Do you know any method to test this on hydra before merging?
And what are your thoughts about pytestFlagsArray = [ "--rootdir=$(mktemp -d)" ];? Wouldn't it make sense to run each derivations tests in its own directory as a default? On darwin this is already the default as the test rootdir is automatically set to something like /private/tmp/nix-build-${drvName}-drv-0.

@jonringer
Copy link
Contributor

@jonringer fsspec still doesn't want to build on hydra but I am getting theresmiley. Do you know any method to test this on hydra before merging?
And what are your thoughts about pytestFlagsArray = [ "--rootdir=$(mktemp -d)" ];? Wouldn't it make sense to run each derivations tests in its own directory as a default? On darwin this is already the default as the test rootdir is automatically set to something like /private/tmp/nix-build-${drvName}-drv-0.

I do not, but this builds fine for me for both 37 and 38

@tricktron
Copy link
Member Author

@jonringer Ok. I guess, then we merge and check if it works on hydra.

@jonringer
Copy link
Contributor

jonringer commented Sep 30, 2020

fsspec is also failing in release-20.09, let's try it

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

2 participants