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.labgrid: init at 0.3.1 #110717

Merged
merged 1 commit into from Feb 17, 2021
Merged

Conversation

Emantor
Copy link
Member

@Emantor Emantor commented Jan 24, 2021

Motivation for this change

Labgrid is an embedded control and testing library, this package
packages the minimum to let the client and core-library work.

Labgrid also has a check for a specific pyserial port we maintain in the project.
Not sure how to deal with this and whether packaging the fork for nixos is fine.

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.

@mweinelt
Copy link
Member

mweinelt commented Jan 25, 2021

Labgrid also has a check for a specific pyserial port we maintain in the project.
Not sure how to deal with this and whether packaging the fork for nixos is fine.

If required you can maintain a fork of pyserial in the labgrid project directory.

The gitAndTools.gitstatus package has a similiar relationship to a libgit2 fork if you're interested in how it's done.

buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];

You can simply take the original pyserial package and override what is different, most probably the src attribute, like in https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix

@Emantor Emantor changed the title python3Packages.labgrid: init at 0.3.0 python3Packages.labgrid: init at 0.3.1 Feb 5, 2021
@worldofpeace
Copy link
Contributor

We merged the patches into our pyserial. Upstream should really accept them, and if they don't then eventually downstreams are just going to roll those patches on their own.

@worldofpeace
Copy link
Contributor

If you can tell from my suggestions I can't find anything wrong with this expression.

Labgrid is an embedded control and testing library, this package
packages the minimum to let the client and core-library work.

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
@Emantor
Copy link
Member Author

Emantor commented Feb 17, 2021

If you can tell from my suggestions I can't find anything wrong with this expression.

I fixed up both suggestions and added a patch to remove the pyserial check (which uses the pyserial version and won't work for NixOS any longer, since NixOS applies the patches downstream). Thanks for the review, this should be good to go now.

@mweinelt
Copy link
Member

This looks a bit odd, but it does not seem to cause issues. Do you know whats happening here? @Emantor

=============== 201 passed, 31 skipped, 27 deselected in 36.30s ================
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} [Errno 2] No such file or directory: 'ssh'
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} [Errno 2] No such file or directory: 'ssh'
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} child has vanished
Finished executing pytestCheckPhase

Apart from that I'm also content with the state of this.

@Emantor
Copy link
Member Author

Emantor commented Feb 17, 2021

This looks a bit odd, but it does not seem to cause issues. Do you know whats happening here? @Emantor

=============== 201 passed, 31 skipped, 27 deselected in 36.30s ================
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} [Errno 2] No such file or directory: 'ssh'
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} [Errno 2] No such file or directory: 'ssh'
An exception occured during cleanup, call the cleanup() method on targets yourself to handle exceptions explictly.
Error: {} child has vanished
Finished executing pytestCheckPhase

Apart from that I'm also content with the state of this.

Yes, we do have some tests which setup a mocked SSH connection, but during teardown we try to cleanup all connections. The cleanup tries to use ssh, but this is not available during the test run on NixOS. The cleanup code was added after the tests were introduced and almost every other platform does have ssh available while running the tests. IMO this is fine to ignore for now, I'll fix the tests for the next release so this should vanish on the next update.

@mweinelt mweinelt merged commit e02ced5 into NixOS:master Feb 17, 2021
@Emantor Emantor deleted the init/labgrid branch February 17, 2021 17:23
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