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

hub: Add test, git reference #107887

Merged
merged 2 commits into from Jan 2, 2021
Merged

hub: Add test, git reference #107887

merged 2 commits into from Jan 2, 2021

Conversation

NeQuissimus
Copy link
Member

Motivation for this change

Added test, found an issue with git not being available.
This is due to hub assuming git exists in the environment.

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.

Hub fetches git from the environment by default.
This can lead to hub installations without git available, which makes little sense.
The change replaces the references with fully-qualified calls to git
@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107887 run on x86_64-darwin 1

1 package built:
  • gitAndTools.hub

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107887 run on x86_64-linux 1

1 package built:
  • gitAndTools.hub

@WolfangAukang
Copy link
Contributor

WolfangAukang commented Jan 2, 2021

Result of nixpkgs-review pr 107887 1

1 package built:
  • gitAndTools.hub

Working fine and code LGTM

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/320

@NeQuissimus NeQuissimus merged commit 4c9414d into NixOS:master Jan 2, 2021
@NeQuissimus NeQuissimus deleted the hub_test branch January 2, 2021 20:43
@zowoq
Copy link
Contributor

zowoq commented Jan 2, 2021

@NeQuissimus Is there a reason you're not using installCheckPhase (example) for tests like this? Booting two VMs for a basic test seems kind of heavy and it doesn't cover darwin either.

@NeQuissimus
Copy link
Member Author

It's mainly because @ofborg runs these tests for us if they are in passthru.tests. And locally I can use nix-update <PKG> --test to do the same.

@zowoq
Copy link
Contributor

zowoq commented Jan 3, 2021

None of that is needed with installCheckPhase as it's run as part of the build process.

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